Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenrik Rentz-Reichert2012-01-18 09:55:54 +0000
committerHenrik Rentz-Reichert2012-01-18 09:55:54 +0000
commit6907852eb9f46ccf3145be51f36e72839fb49d24 (patch)
tree97d109349be1c400e486decf708f3ede0bfd9f18 /runtime
parent3a48b46b2613b03230e97c909846244ba8034fb1 (diff)
downloadorg.eclipse.etrice-6907852eb9f46ccf3145be51f36e72839fb49d24.tar.gz
org.eclipse.etrice-6907852eb9f46ccf3145be51f36e72839fb49d24.tar.xz
org.eclipse.etrice-6907852eb9f46ccf3145be51f36e72839fb49d24.zip
[generator] bug fix in attribute initialization
re-generated integration tests and modellib
Diffstat (limited to 'runtime')
-rw-r--r--runtime/org.eclipse.etrice.modellib/jgen_modellib.launch12
-rw-r--r--runtime/org.eclipse.etrice.modellib/src-gen/org/eclipse/etrice/modellib/Socket/DSocketConfiguration.java10
-rw-r--r--runtime/org.eclipse.etrice.modellib/src-gen/org/eclipse/etrice/modellib/Socket/DSocketData.java4
-rw-r--r--runtime/org.eclipse.etrice.modellib/src-gen/room/basic/service/logging/ALogService.java3
-rw-r--r--runtime/org.eclipse.etrice.modellib/src-gen/room/basic/service/logging/InternalLogData.java14
-rw-r--r--runtime/org.eclipse.etrice.modellib/src-gen/room/basic/service/logging/Log.java5
-rw-r--r--runtime/org.eclipse.etrice.modellib/src-gen/room/basic/service/logging/LogData.java51
7 files changed, 29 insertions, 70 deletions
diff --git a/runtime/org.eclipse.etrice.modellib/jgen_modellib.launch b/runtime/org.eclipse.etrice.modellib/jgen_modellib.launch
new file mode 100644
index 000000000..5074d0e3f
--- /dev/null
+++ b/runtime/org.eclipse.etrice.modellib/jgen_modellib.launch
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/Main.java"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.etrice.generator.java.Main"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="${workspace_loc:org.eclipse.etrice.modellib}/models/ALogService.room&#13;&#10;${workspace_loc:org.eclipse.etrice.modellib}/models/Socket.room&#13;&#10;${workspace_loc:org.eclipse.etrice.modellib}/models/TimingService.room&#13;&#10;-lib"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.etrice.generator.java"/>
+</launchConfiguration>
diff --git a/runtime/org.eclipse.etrice.modellib/src-gen/org/eclipse/etrice/modellib/Socket/DSocketConfiguration.java b/runtime/org.eclipse.etrice.modellib/src-gen/org/eclipse/etrice/modellib/Socket/DSocketConfiguration.java
index 0264da386..175072a53 100644
--- a/runtime/org.eclipse.etrice.modellib/src-gen/org/eclipse/etrice/modellib/Socket/DSocketConfiguration.java
+++ b/runtime/org.eclipse.etrice.modellib/src-gen/org/eclipse/etrice/modellib/Socket/DSocketConfiguration.java
@@ -7,11 +7,11 @@ public class DSocketConfiguration {
//--------------------- attributes
- protected String serverName = "";
- protected int portNumber = 0;
- protected int protocol = 0;
- protected boolean checkCookie = false;
- protected int mode = 0;
+ protected String serverName;
+ protected int portNumber;
+ protected int protocol;
+ protected boolean checkCookie;
+ protected int mode;
//--------------------- attribute setters and getters
public void setServerName (String serverName) {
diff --git a/runtime/org.eclipse.etrice.modellib/src-gen/org/eclipse/etrice/modellib/Socket/DSocketData.java b/runtime/org.eclipse.etrice.modellib/src-gen/org/eclipse/etrice/modellib/Socket/DSocketData.java
index 271a460e3..1aedbd300 100644
--- a/runtime/org.eclipse.etrice.modellib/src-gen/org/eclipse/etrice/modellib/Socket/DSocketData.java
+++ b/runtime/org.eclipse.etrice.modellib/src-gen/org/eclipse/etrice/modellib/Socket/DSocketData.java
@@ -7,8 +7,8 @@ public class DSocketData {
//--------------------- attributes
- protected int size = 0;
- protected String data = "";
+ protected int size;
+ protected String data;
//--------------------- attribute setters and getters
public void setSize (int size) {
diff --git a/runtime/org.eclipse.etrice.modellib/src-gen/room/basic/service/logging/ALogService.java b/runtime/org.eclipse.etrice.modellib/src-gen/room/basic/service/logging/ALogService.java
index 37d2e2737..ab8f18141 100644
--- a/runtime/org.eclipse.etrice.modellib/src-gen/room/basic/service/logging/ALogService.java
+++ b/runtime/org.eclipse.etrice.modellib/src-gen/room/basic/service/logging/ALogService.java
@@ -266,8 +266,7 @@ public class ALogService extends ActorClassBase {
p=null;
}
protected void action_TRANS_opened_TO_opened_BY_internalLoglog_tr1(InterfaceItemBase ifitem, InternalLogData data) {
- long s = Long.valueOf(data.timeStamp);
- p.println("Timestamp: " + Long.toString(s-tStart) + "ms");
+ p.println("Timestamp: " + Long.toString(data.timeStamp-tStart) + "ms");
p.println("SenderInstance: "+ data.sender);
p.println("UserString: " + data.userString);
p.println("--------------------------------------------------");
diff --git a/runtime/org.eclipse.etrice.modellib/src-gen/room/basic/service/logging/InternalLogData.java b/runtime/org.eclipse.etrice.modellib/src-gen/room/basic/service/logging/InternalLogData.java
index ad18afdf3..752ab503e 100644
--- a/runtime/org.eclipse.etrice.modellib/src-gen/room/basic/service/logging/InternalLogData.java
+++ b/runtime/org.eclipse.etrice.modellib/src-gen/room/basic/service/logging/InternalLogData.java
@@ -7,9 +7,9 @@ public class InternalLogData {
//--------------------- attributes
- protected String userString = "";
- protected String sender = "";
- protected String timeStamp = "";
+ protected String userString;
+ protected String sender;
+ protected long timeStamp;
//--------------------- attribute setters and getters
public void setUserString (String userString) {
@@ -24,10 +24,10 @@ public class InternalLogData {
public String getSender () {
return this.sender;
}
- public void setTimeStamp (String timeStamp) {
+ public void setTimeStamp (long timeStamp) {
this.timeStamp = timeStamp;
}
- public String getTimeStamp () {
+ public long getTimeStamp () {
return this.timeStamp;
}
@@ -39,11 +39,11 @@ public class InternalLogData {
// initialize attributes
userString = "";
sender = "";
- timeStamp = "";
+ timeStamp = 0;
}
// constructor using fields
- public InternalLogData(String userString, String sender, String timeStamp) {
+ public InternalLogData(String userString, String sender, long timeStamp) {
super();
this.userString = userString;
this.sender = sender;
diff --git a/runtime/org.eclipse.etrice.modellib/src-gen/room/basic/service/logging/Log.java b/runtime/org.eclipse.etrice.modellib/src-gen/room/basic/service/logging/Log.java
index 4036df8dc..5faabbb9c 100644
--- a/runtime/org.eclipse.etrice.modellib/src-gen/room/basic/service/logging/Log.java
+++ b/runtime/org.eclipse.etrice.modellib/src-gen/room/basic/service/logging/Log.java
@@ -150,8 +150,7 @@ public class Log {
long s;
if (logLevel>this.logLevel){
d.userString=userString;
- s=System.currentTimeMillis();
- d.timeStamp=Long.toString(s);
+ d.timeStamp=System.currentTimeMillis();
d.sender=getInstancePath();
if (getPeerAddress()!=null)
getPeerMsgReceiver().receive(new EventWithDataMessage(getPeerAddress(), IN_internalLog, d));
@@ -183,7 +182,7 @@ public class Log {
if (getPeerAddress()!=null)
getPeerMsgReceiver().receive(new EventWithDataMessage(getPeerAddress(), IN_internalLog, data.deepCopy()));
}
- public void internalLog(String userString, String sender, String timeStamp) {
+ public void internalLog(String userString, String sender, long timeStamp) {
internalLog(new InternalLogData(userString, sender, timeStamp));
}
}
diff --git a/runtime/org.eclipse.etrice.modellib/src-gen/room/basic/service/logging/LogData.java b/runtime/org.eclipse.etrice.modellib/src-gen/room/basic/service/logging/LogData.java
deleted file mode 100644
index c38358251..000000000
--- a/runtime/org.eclipse.etrice.modellib/src-gen/room/basic/service/logging/LogData.java
+++ /dev/null
@@ -1,51 +0,0 @@
-package room.basic.service.logging;
-
-
-
-
-public class LogData {
-
-
- //--------------------- attributes
- protected int logLevel = 0;
- protected String userString = "";
-
- //--------------------- attribute setters and getters
- public void setLogLevel (int logLevel) {
- this.logLevel = logLevel;
- }
- public int getLogLevel () {
- return this.logLevel;
- }
- public void setUserString (String userString) {
- this.userString = userString;
- }
- public String getUserString () {
- return this.userString;
- }
-
- //--------------------- operations
-
- // default constructor
- public LogData() {
- super();
- // initialize attributes
- logLevel = 0;
- userString = "";
- }
-
- // constructor using fields
- public LogData(int logLevel, String userString) {
- super();
- this.logLevel = logLevel;
- this.userString = userString;
- }
-
- // deep copy
- public LogData deepCopy() {
- LogData copy = new LogData();
- copy.logLevel = logLevel;
- copy.userString = userString;
- return copy;
- }
-};

Back to the top