summaryrefslogtreecommitdiff
path: root/sources/protocols/implementations/InternalTimeSyncProtocol.java
diff options
context:
space:
mode:
Diffstat (limited to 'sources/protocols/implementations/InternalTimeSyncProtocol.java')
-rw-r--r--sources/protocols/implementations/InternalTimeSyncProtocol.java34
1 files changed, 34 insertions, 0 deletions
diff --git a/sources/protocols/implementations/InternalTimeSyncProtocol.java b/sources/protocols/implementations/InternalTimeSyncProtocol.java
index ff9c4e3..2f9a84c 100644
--- a/sources/protocols/implementations/InternalTimeSyncProtocol.java
+++ b/sources/protocols/implementations/InternalTimeSyncProtocol.java
@@ -1,11 +1,24 @@
+/*
+ * VS is (c) 2008 by Paul C. Buetow
+ * vs@dev.buetow.org
+ */
package protocols.implementations;
import core.VSMessage;
import protocols.VSProtocol;
+// TODO: Auto-generated Javadoc
+/**
+ * The Class InternalTimeSyncProtocol.
+ */
public class InternalTimeSyncProtocol extends VSProtocol {
+
+ /** The waiting for response. */
private boolean waitingForResponse;
+ /**
+ * Instantiates a new internal time sync protocol.
+ */
public InternalTimeSyncProtocol() {
setClassname(getClass().toString());
@@ -14,12 +27,21 @@ public class InternalTimeSyncProtocol extends VSProtocol {
setLong("t_max", 2000);
}
+ /* (non-Javadoc)
+ * @see events.VSEvent#onInit()
+ */
protected void onInit() {
}
+ /* (non-Javadoc)
+ * @see protocols.VSProtocol#onClientReset()
+ */
protected void onClientReset() {
}
+ /* (non-Javadoc)
+ * @see protocols.VSProtocol#onClientStart()
+ */
protected void onClientStart() {
waitingForResponse = true;
@@ -29,6 +51,9 @@ public class InternalTimeSyncProtocol extends VSProtocol {
sendMessage(message);
}
+ /* (non-Javadoc)
+ * @see protocols.VSProtocol#onClientRecv(core.VSMessage)
+ */
protected void onClientRecv(VSMessage recvMessage) {
/* Ignore all protocol messages which are not a response message, e.g. itself */
if (!recvMessage.getBoolean("isServerResponse"))
@@ -51,9 +76,15 @@ public class InternalTimeSyncProtocol extends VSProtocol {
process.setTime(newTime);
}
+ /* (non-Javadoc)
+ * @see protocols.VSProtocol#onServerReset()
+ */
protected void onServerReset() {
}
+ /* (non-Javadoc)
+ * @see protocols.VSProtocol#onServerRecv(core.VSMessage)
+ */
protected void onServerRecv(VSMessage recvMessage) {
/* Ignore all protocol messages which are not a request message, e.g. itself */
if (!recvMessage.getBoolean("isClientRequest"))
@@ -66,6 +97,9 @@ public class InternalTimeSyncProtocol extends VSProtocol {
sendMessage(message);
}
+ /* (non-Javadoc)
+ * @see protocols.VSProtocol#toString()
+ */
public String toString() {
return super.toString();
}