java.lang.Object
|
+----TET.SyncMessage
- public class SyncMessage
- extends Object
The SyncMessage
class provides the details of one message used
during a TET sychronization event.
Variable Index
-
TET_SMDUP
- Bit value for flags, indicating that more than one system attempted
to send message data.
-
TET_SMMSGMAX
- Maximum size of a sync message.
-
TET_SMRCVMSG
- Bit value for flags, indicating that the system is receiving message
data.
-
TET_SMSNDMSG
- Bit value for flags, indicating that the system is sending message
data.
-
TET_SMTRUNC
- Bit value for flags, indicating that the message data was truncated.
Constructor Index
-
SyncMessage()
- Construct an empty
SyncMessage
.
-
SyncMessage(byte[])
- Construct a
SyncMessage
which will be used for the
transmission of a message.
-
SyncMessage(int)
- Construct a
SyncMessage
which will be used for the
reception of a message.
Method Index
-
duplicated()
- Were there two senders during synchronization?
-
getSysID()
- Get the value of the system ID of the sending system.
-
length()
- Retrieve the message length.
-
message()
- Retrieve the message data.
-
sender()
- Was this message sent or does it contains message received from
another system?
-
set_message(byte[])
- Set up a
SyncMessage
for transmission of a message.
-
set_receive_length(int)
- Set up a
SyncMessage
for reception of a message.
-
truncated()
- Was this synchronization message truncated?
Variables
TET_SMSNDMSG
public static final int TET_SMSNDMSG
- Bit value for flags, indicating that the system is sending message
data.
Provided as public for backwards compatibility only; serves no
useful purpose outside package.
TET_SMRCVMSG
public static final int TET_SMRCVMSG
- Bit value for flags, indicating that the system is receiving message
data.
Provided as public for backwards compatibility only; serves no
useful purpose outside package.
TET_SMDUP
public static final int TET_SMDUP
- Bit value for flags, indicating that more than one system attempted
to send message data.
Provided as public for backwards compatibility only; serves no
useful purpose outside package.
TET_SMTRUNC
public static final int TET_SMTRUNC
- Bit value for flags, indicating that the message data was truncated.
Provided as public for backwards compatibility only; serves no
useful purpose outside package.
TET_SMMSGMAX
public static final int TET_SMMSGMAX
- Maximum size of a sync message. Size must be expressable in 12 bits.
Constructors
SyncMessage
public SyncMessage()
- Construct an empty
SyncMessage
.
SyncMessage
public SyncMessage(byte msg[])
- Construct a
SyncMessage
which will be used for the
transmission of a message.
- Parameters:
- msg - the message to send.
SyncMessage
public SyncMessage(int msglen)
- Construct a
SyncMessage
which will be used for the
reception of a message.
- Parameters:
- msglen - the size of the receive buffer to set up.
Methods
set_message
public void set_message(byte msg[])
- Set up a
SyncMessage
for transmission of a message.
- Parameters:
- msg - the message to send.
length
public int length()
- Retrieve the message length.
- Returns:
- the message length.
set_receive_length
public void set_receive_length(int msglen)
- Set up a
SyncMessage
for reception of a message.
- Parameters:
- msglen - the size of the receive buffer to set up.
message
public byte[] message()
- Retrieve the message data.
- Returns:
- the message data (as a byte array),
null
if there is no message data.
truncated
public boolean truncated()
- Was this synchronization message truncated?
- Returns:
-
true
if the message was truncated because
the message was longer than the receive buffer or
because the message was longer than the permitted
message length.
duplicated
public boolean duplicated()
- Were there two senders during synchronization?
- Returns:
-
true
if there were two senders during
synchronization.
sender
public boolean sender()
- Was this message sent or does it contains message received from
another system?
- Returns:
-
true
if this message was sent during
synchronization.
getSysID
public int getSysID()
- Get the value of the system ID of the sending system.
- Returns:
- the value of the system ID, or -1 if this message data
was not used to receive data.