Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Schuetz2012-01-16 08:54:46 +0000
committerThomas Schuetz2012-01-16 08:54:46 +0000
commita1c1528bf5d71ba66eb99045edaf3a9fd9fb78f2 (patch)
tree58e5c17998caa21bf68cd3c4922e3134779729cc /runtime
parent4602c8edc1bcf24873d6dda813dee5874cb9b70c (diff)
parente0d45f9d3ce14f12066da9b041f77eda8c954a73 (diff)
downloadorg.eclipse.etrice-a1c1528bf5d71ba66eb99045edaf3a9fd9fb78f2.tar.gz
org.eclipse.etrice-a1c1528bf5d71ba66eb99045edaf3a9fd9fb78f2.tar.xz
org.eclipse.etrice-a1c1528bf5d71ba66eb99045edaf3a9fd9fb78f2.zip
Merge branch 'master' of ssh://git.eclipse.org/gitroot/etrice/org.eclipse.etrice
Diffstat (limited to 'runtime')
-rw-r--r--runtime/org.eclipse.etrice.modellib/models/ALogService.room23
-rw-r--r--runtime/org.eclipse.etrice.modellib/src-gen/org/eclipse/etrice/modellib/Socket/DSocketConfiguration.java11
-rw-r--r--runtime/org.eclipse.etrice.modellib/src-gen/org/eclipse/etrice/modellib/Socket/DSocketData.java8
-rw-r--r--runtime/org.eclipse.etrice.modellib/src-gen/org/eclipse/etrice/modellib/Socket/PSocket.java78
-rw-r--r--runtime/org.eclipse.etrice.modellib/src-gen/room/basic/service/logging/InternalLogData.java37
-rw-r--r--runtime/org.eclipse.etrice.modellib/src-gen/room/basic/service/logging/Log.java62
-rw-r--r--runtime/org.eclipse.etrice.modellib/src-gen/room/basic/service/logging/LogData.java51
-rw-r--r--runtime/org.eclipse.etrice.modellib/src-gen/room/basic/service/timing/PTimeout.java27
-rw-r--r--runtime/org.eclipse.etrice.modellib/src-gen/room/basic/service/timing/PTimer.java27
9 files changed, 176 insertions, 148 deletions
diff --git a/runtime/org.eclipse.etrice.modellib/models/ALogService.room b/runtime/org.eclipse.etrice.modellib/models/ALogService.room
index 9b102b70d..3a946c1ce 100644
--- a/runtime/org.eclipse.etrice.modellib/models/ALogService.room
+++ b/runtime/org.eclipse.etrice.modellib/models/ALogService.room
@@ -58,8 +58,7 @@ RoomModel room.basic.service.logging {
<internalLog: log>
}
action {
- "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(\"--------------------------------------------------\");"
@@ -75,11 +74,11 @@ RoomModel room.basic.service.logging {
ProtocolClass Log {
incoming {
Message open(fileName: string)
- Message setLogLevel(l: int32)
Message close()
- Message internalLog(data: InternalLogData)
+ private Message internalLog(data: InternalLogData)
}
- outgoing { } conjugate PortClass {
+
+ conjugate PortClass {
usercode {
"public static final int LOG_LEVEL_LOW = 1;"
"public static final int LOG_LEVEL_MEDIUM = 2;"
@@ -87,19 +86,15 @@ RoomModel room.basic.service.logging {
"static int logLevel=0;"
"InternalLogData d = new InternalLogData();"
}
- handle setLogLevel {
+ Operation setLogLevel(l: int32) {
"logLevel=l;"
"if (logLevel > LOG_LEVEL_HIGH) logLevel=LOG_LEVEL_HIGH;"
}
- handle internalLog{
- "System.out.printf(\"\\ndonīt use the internalLog messages !\\n\");"
- }
- Operation log(logLevel:int32, userString:string){
+ Operation log(logLevel: int32, userString: string) sends internalLog {
"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));"
@@ -109,9 +104,9 @@ RoomModel room.basic.service.logging {
}
DataClass InternalLogData {
- Attribute timeStamp:string
- Attribute sender: string
Attribute userString: string
+ Attribute sender: string
+ Attribute timeStamp: int64
}
} \ No newline at end of file
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 d79ea15fa..0264da386 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
@@ -49,6 +49,7 @@ public class DSocketConfiguration {
// default constructor
public DSocketConfiguration() {
+ super();
// initialize attributes
serverName = "";
portNumber = 0;
@@ -57,6 +58,16 @@ public class DSocketConfiguration {
mode = 0;
}
+ // constructor using fields
+ public DSocketConfiguration(String serverName, int portNumber, int protocol, boolean checkCookie, int mode) {
+ super();
+ this.serverName = serverName;
+ this.portNumber = portNumber;
+ this.protocol = protocol;
+ this.checkCookie = checkCookie;
+ this.mode = mode;
+ }
+
// deep copy
public DSocketConfiguration deepCopy() {
DSocketConfiguration copy = new DSocketConfiguration();
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 6aa26a518..271a460e3 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
@@ -28,11 +28,19 @@ public class DSocketData {
// default constructor
public DSocketData() {
+ super();
// initialize attributes
size = 0;
data = "";
}
+ // constructor using fields
+ public DSocketData(int size, String data) {
+ super();
+ this.size = size;
+ this.data = data;
+ }
+
// deep copy
public DSocketData deepCopy() {
DSocketData copy = new DSocketData();
diff --git a/runtime/org.eclipse.etrice.modellib/src-gen/org/eclipse/etrice/modellib/Socket/PSocket.java b/runtime/org.eclipse.etrice.modellib/src-gen/org/eclipse/etrice/modellib/Socket/PSocket.java
index 279e19fdb..c530e5914 100644
--- a/runtime/org.eclipse.etrice.modellib/src-gen/org/eclipse/etrice/modellib/Socket/PSocket.java
+++ b/runtime/org.eclipse.etrice.modellib/src-gen/org/eclipse/etrice/modellib/Socket/PSocket.java
@@ -74,8 +74,7 @@ public class PSocket {
// sent messages
- public void connected ()
- {
+ public void connected() {
if (messageStrings[ OUT_connected] != "timerTick"){
// TODOTS: model switch for activation
DebuggingService.getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(), messageStrings[OUT_connected]);
@@ -83,8 +82,7 @@ public class PSocket {
if (getPeerAddress()!=null)
getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), OUT_connected));
}
- public void disconnected ()
- {
+ public void disconnected() {
if (messageStrings[ OUT_disconnected] != "timerTick"){
// TODOTS: model switch for activation
DebuggingService.getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(), messageStrings[OUT_disconnected]);
@@ -92,8 +90,7 @@ public class PSocket {
if (getPeerAddress()!=null)
getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), OUT_disconnected));
}
- public void receivedData ()
- {
+ public void receivedData() {
if (messageStrings[ OUT_receivedData] != "timerTick"){
// TODOTS: model switch for activation
DebuggingService.getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(), messageStrings[OUT_receivedData]);
@@ -101,8 +98,7 @@ public class PSocket {
if (getPeerAddress()!=null)
getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), OUT_receivedData));
}
- public void sentData ()
- {
+ public void sentData() {
if (messageStrings[ OUT_sentData] != "timerTick"){
// TODOTS: model switch for activation
DebuggingService.getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(), messageStrings[OUT_sentData]);
@@ -110,8 +106,7 @@ public class PSocket {
if (getPeerAddress()!=null)
getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), OUT_sentData));
}
- public void error ()
- {
+ public void error() {
if (messageStrings[ OUT_error] != "timerTick"){
// TODOTS: model switch for activation
DebuggingService.getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(), messageStrings[OUT_error]);
@@ -149,39 +144,29 @@ public class PSocket {
}
// outgoing messages
- public void connected ()
- {
+ public void connected(){
for (int i=0; i<replication; ++i) {
- ports.get(i).connected()
- ;
+ ports.get(i).connected();
}
}
- public void disconnected ()
- {
+ public void disconnected(){
for (int i=0; i<replication; ++i) {
- ports.get(i).disconnected()
- ;
+ ports.get(i).disconnected();
}
}
- public void receivedData ()
- {
+ public void receivedData(){
for (int i=0; i<replication; ++i) {
- ports.get(i).receivedData()
- ;
+ ports.get(i).receivedData();
}
}
- public void sentData ()
- {
+ public void sentData(){
for (int i=0; i<replication; ++i) {
- ports.get(i).sentData()
- ;
+ ports.get(i).sentData();
}
}
- public void error ()
- {
+ public void error(){
for (int i=0; i<replication; ++i) {
- ports.get(i).error()
- ;
+ ports.get(i).error();
}
}
}
@@ -220,8 +205,7 @@ public class PSocket {
// sent messages
- public void connect (DSocketConfiguration config)
- {
+ public void connect(DSocketConfiguration config) {
if (messageStrings[ IN_connect] != "timerTick"){
// TODOTS: model switch for activation
DebuggingService.getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(), messageStrings[IN_connect]);
@@ -229,8 +213,10 @@ public class PSocket {
if (getPeerAddress()!=null)
getPeerMsgReceiver().receive(new EventWithDataMessage(getPeerAddress(), IN_connect, config.deepCopy()));
}
- public void disconnect ()
- {
+ public void connect(String serverName, int portNumber, int protocol, boolean checkCookie, int mode) {
+ connect(new DSocketConfiguration(serverName, portNumber, protocol, checkCookie, mode));
+ }
+ public void disconnect() {
if (messageStrings[ IN_disconnect] != "timerTick"){
// TODOTS: model switch for activation
DebuggingService.getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(), messageStrings[IN_disconnect]);
@@ -238,8 +224,7 @@ public class PSocket {
if (getPeerAddress()!=null)
getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), IN_disconnect));
}
- public void sendData (DSocketData data)
- {
+ public void sendData(DSocketData data) {
if (messageStrings[ IN_sendData] != "timerTick"){
// TODOTS: model switch for activation
DebuggingService.getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(), messageStrings[IN_sendData]);
@@ -247,6 +232,9 @@ public class PSocket {
if (getPeerAddress()!=null)
getPeerMsgReceiver().receive(new EventWithDataMessage(getPeerAddress(), IN_sendData, data.deepCopy()));
}
+ public void sendData(int size, String data) {
+ sendData(new DSocketData(size, data));
+ }
}
// replicated port class
@@ -277,25 +265,19 @@ public class PSocket {
}
// incoming messages
- public void connect (DSocketConfiguration config)
- {
+ public void connect(DSocketConfiguration config){
for (int i=0; i<replication; ++i) {
- ports.get(i).connect( config)
- ;
+ ports.get(i).connect( config);
}
}
- public void disconnect ()
- {
+ public void disconnect(){
for (int i=0; i<replication; ++i) {
- ports.get(i).disconnect()
- ;
+ ports.get(i).disconnect();
}
}
- public void sendData (DSocketData data)
- {
+ public void sendData(DSocketData data){
for (int i=0; i<replication; ++i) {
- ports.get(i).sendData( data)
- ;
+ ports.get(i).sendData( data);
}
}
}
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 91aef4ab2..ad18afdf3 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,16 +7,16 @@ public class InternalLogData {
//--------------------- attributes
- protected String timeStamp = "";
- protected String sender = "";
protected String userString = "";
+ protected String sender = "";
+ protected String timeStamp = "";
//--------------------- attribute setters and getters
- public void setTimeStamp (String timeStamp) {
- this.timeStamp = timeStamp;
+ public void setUserString (String userString) {
+ this.userString = userString;
}
- public String getTimeStamp () {
- return this.timeStamp;
+ public String getUserString () {
+ return this.userString;
}
public void setSender (String sender) {
this.sender = sender;
@@ -24,29 +24,38 @@ public class InternalLogData {
public String getSender () {
return this.sender;
}
- public void setUserString (String userString) {
- this.userString = userString;
+ public void setTimeStamp (String timeStamp) {
+ this.timeStamp = timeStamp;
}
- public String getUserString () {
- return this.userString;
+ public String getTimeStamp () {
+ return this.timeStamp;
}
//--------------------- operations
// default constructor
public InternalLogData() {
+ super();
// initialize attributes
- timeStamp = "";
- sender = "";
userString = "";
+ sender = "";
+ timeStamp = "";
+ }
+
+ // constructor using fields
+ public InternalLogData(String userString, String sender, String timeStamp) {
+ super();
+ this.userString = userString;
+ this.sender = sender;
+ this.timeStamp = timeStamp;
}
// deep copy
public InternalLogData deepCopy() {
InternalLogData copy = new InternalLogData();
- copy.timeStamp = timeStamp;
- copy.sender = sender;
copy.userString = userString;
+ copy.sender = sender;
+ copy.timeStamp = timeStamp;
return copy;
}
};
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 5dae83b59..4036df8dc 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
@@ -17,14 +17,13 @@ public class Log {
//IDs for outgoing messages
//IDs for incoming messages
public static final int IN_open = 1;
- public static final int IN_setLogLevel = 2;
- public static final int IN_close = 3;
- public static final int IN_internalLog = 4;
+ public static final int IN_close = 2;
+ public static final int IN_internalLog = 3;
//error if msgID >= MSG_MAX
- public static final int MSG_MAX = 5;
+ public static final int MSG_MAX = 4;
- private static String messageStrings[] = {"MIN", "open","setLogLevel","close","internalLog","MAX"};
+ private static String messageStrings[] = {"MIN", "open","close","internalLog","MAX"};
public String getMessageString(int msg_id) {
if (msg_id<MSG_MIN || msg_id>MSG_MAX+1){
@@ -143,6 +142,10 @@ public class Log {
//--------------------- attributes
//--------------------- operations
+ public void setLogLevel(int l) {
+ logLevel=l;
+ if (logLevel > LOG_LEVEL_HIGH) logLevel=LOG_LEVEL_HIGH;
+ }
public void log(int logLevel, String userString) {
long s;
if (logLevel>this.logLevel){
@@ -156,8 +159,7 @@ public class Log {
}
// sent messages
- public void open (String fileName)
- {
+ public void open(String fileName) {
if (messageStrings[ IN_open] != "timerTick"){
// TODOTS: model switch for activation
DebuggingService.getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(), messageStrings[IN_open]);
@@ -165,13 +167,7 @@ public class Log {
if (getPeerAddress()!=null)
getPeerMsgReceiver().receive(new EventWithDataMessage(getPeerAddress(), IN_open, fileName));
}
- public void setLogLevel (int l)
- {
- logLevel=l;
- if (logLevel > LOG_LEVEL_HIGH) logLevel=LOG_LEVEL_HIGH;
- }
- public void close ()
- {
+ public void close() {
if (messageStrings[ IN_close] != "timerTick"){
// TODOTS: model switch for activation
DebuggingService.getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(), messageStrings[IN_close]);
@@ -179,9 +175,16 @@ public class Log {
if (getPeerAddress()!=null)
getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), IN_close));
}
- public void internalLog (InternalLogData data)
- {
- System.out.printf("\ndonīt use the internalLog messages !\n");
+ private void internalLog(InternalLogData data) {
+ if (messageStrings[ IN_internalLog] != "timerTick"){
+ // TODOTS: model switch for activation
+ DebuggingService.getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(), messageStrings[IN_internalLog]);
+ }
+ if (getPeerAddress()!=null)
+ getPeerMsgReceiver().receive(new EventWithDataMessage(getPeerAddress(), IN_internalLog, data.deepCopy()));
+ }
+ public void internalLog(String userString, String sender, String timeStamp) {
+ internalLog(new InternalLogData(userString, sender, timeStamp));
}
}
@@ -213,32 +216,19 @@ public class Log {
}
// incoming messages
- public void open (String fileName)
- {
- for (int i=0; i<replication; ++i) {
- ports.get(i).open( fileName)
- ;
- }
- }
- public void setLogLevel (int l)
- {
+ public void open(String fileName){
for (int i=0; i<replication; ++i) {
- ports.get(i).setLogLevel( l)
- ;
+ ports.get(i).open( fileName);
}
}
- public void close ()
- {
+ public void close(){
for (int i=0; i<replication; ++i) {
- ports.get(i).close()
- ;
+ ports.get(i).close();
}
}
- public void internalLog (InternalLogData data)
- {
+ private void internalLog(InternalLogData data){
for (int i=0; i<replication; ++i) {
- ports.get(i).internalLog( data)
- ;
+ ports.get(i).internalLog( data);
}
}
}
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
new file mode 100644
index 000000000..c38358251
--- /dev/null
+++ b/runtime/org.eclipse.etrice.modellib/src-gen/room/basic/service/logging/LogData.java
@@ -0,0 +1,51 @@
+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;
+ }
+};
diff --git a/runtime/org.eclipse.etrice.modellib/src-gen/room/basic/service/timing/PTimeout.java b/runtime/org.eclipse.etrice.modellib/src-gen/room/basic/service/timing/PTimeout.java
index 42b4a0b83..1df8619e3 100644
--- a/runtime/org.eclipse.etrice.modellib/src-gen/room/basic/service/timing/PTimeout.java
+++ b/runtime/org.eclipse.etrice.modellib/src-gen/room/basic/service/timing/PTimeout.java
@@ -145,8 +145,7 @@ public class PTimeout {
}
// sent messages
- public void timeoutTick ()
- {
+ public void timeoutTick() {
if (messageStrings[ OUT_timeoutTick] != "timerTick"){
// TODOTS: model switch for activation
DebuggingService.getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(), messageStrings[OUT_timeoutTick]);
@@ -184,11 +183,9 @@ public class PTimeout {
}
// outgoing messages
- public void timeoutTick ()
- {
+ public void timeoutTick(){
for (int i=0; i<replication; ++i) {
- ports.get(i).timeoutTick()
- ;
+ ports.get(i).timeoutTick();
}
}
}
@@ -247,8 +244,7 @@ public class PTimeout {
//--------------------- operations
// sent messages
- public void Start (int time_ms)
- {
+ public void Start(int time_ms) {
//conjugate PortClass handle start
if (active)
return;
@@ -262,8 +258,7 @@ public class PTimeout {
new EventWithDataMessage(getPeerAddress(),
IN_Start, new TimeoutData(time_ms, ++currentId)));
}
- public void Kill ()
- {
+ public void Kill() {
//conjugate PortClass kill
DebuggingService.getInstance().addMessageAsyncOut(getAddress(),
getPeerAddress(), messageStrings[IN_Kill]);
@@ -304,18 +299,14 @@ public class PTimeout {
}
// incoming messages
- public void Start (int time_ms)
- {
+ public void Start(int time_ms){
for (int i=0; i<replication; ++i) {
- ports.get(i).Start( time_ms)
- ;
+ ports.get(i).Start( time_ms);
}
}
- public void Kill ()
- {
+ public void Kill(){
for (int i=0; i<replication; ++i) {
- ports.get(i).Kill()
- ;
+ ports.get(i).Kill();
}
}
}
diff --git a/runtime/org.eclipse.etrice.modellib/src-gen/room/basic/service/timing/PTimer.java b/runtime/org.eclipse.etrice.modellib/src-gen/room/basic/service/timing/PTimer.java
index 74a4d4d9c..426cafb1f 100644
--- a/runtime/org.eclipse.etrice.modellib/src-gen/room/basic/service/timing/PTimer.java
+++ b/runtime/org.eclipse.etrice.modellib/src-gen/room/basic/service/timing/PTimer.java
@@ -145,8 +145,7 @@ public class PTimer {
}
// sent messages
- public void timerTick ()
- {
+ public void timerTick() {
if (messageStrings[ OUT_timerTick] != "timerTick"){
// TODOTS: model switch for activation
DebuggingService.getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(), messageStrings[OUT_timerTick]);
@@ -184,11 +183,9 @@ public class PTimer {
}
// outgoing messages
- public void timerTick ()
- {
+ public void timerTick(){
for (int i=0; i<replication; ++i) {
- ports.get(i).timerTick()
- ;
+ ports.get(i).timerTick();
}
}
}
@@ -246,8 +243,7 @@ public class PTimer {
//--------------------- operations
// sent messages
- public void Start (int time_ms)
- {
+ public void Start(int time_ms) {
//conjugate PortClass handle start
if (active)
return;
@@ -261,8 +257,7 @@ public class PTimer {
new EventWithDataMessage(getPeerAddress(),
IN_Start, new TimerData(time_ms, ++currentId)));
}
- public void Kill ()
- {
+ public void Kill() {
//conjugate PortClass kill
DebuggingService.getInstance().addMessageAsyncOut(getAddress(),
getPeerAddress(), messageStrings[IN_Kill]);
@@ -303,18 +298,14 @@ public class PTimer {
}
// incoming messages
- public void Start (int time_ms)
- {
+ public void Start(int time_ms){
for (int i=0; i<replication; ++i) {
- ports.get(i).Start( time_ms)
- ;
+ ports.get(i).Start( time_ms);
}
}
- public void Kill ()
- {
+ public void Kill(){
for (int i=0; i<replication; ++i) {
- ports.get(i).Kill()
- ;
+ ports.get(i).Kill();
}
}
}

Back to the top