|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ionetrics.lib.annotatorcomm.CommandMessage
public class CommandMessage
CommandMessage encapsulates the bytes of a command message and provides helpful methods for manipulating them.
Field Summary | |
---|---|
static int |
CHECKSUM_RIDX
Checksum reverse index |
static int |
FOOTER_LEN
Length of the footer in bytes |
static int |
HEADER_LEN
Length of the header in bytes |
static int |
MSG_LEN_IDX
Message length index |
Constructor Summary | |
---|---|
CommandMessage(CommandId cmdId)
Construct a CommandMessage. |
|
CommandMessage(short cmdId)
Construct a CommandMessage. |
Method Summary | |
---|---|
void |
addParamInt16(short param)
Append a parameter as a 16-bit integer. |
void |
addParamInt32(int param)
Append a parameter as an 32-bit integer. |
void |
addParamInt64(long param)
Append a parameter as an 64-bit integer. |
void |
addParamInt8(byte param)
Append a parameter as a 8-bit integer. |
byte[] |
getBytes()
Get the command byte string. |
short |
getId()
Get the Command ID. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int HEADER_LEN
public static final int FOOTER_LEN
public static final int MSG_LEN_IDX
public static final int CHECKSUM_RIDX
Constructor Detail |
---|
public CommandMessage(CommandId cmdId)
cmdId
- Command IDpublic CommandMessage(short cmdId)
cmdId
- Command IDMethod Detail |
---|
public short getId()
public void addParamInt8(byte param)
param
- parameterpublic void addParamInt16(short param)
param
- parameterpublic void addParamInt32(int param)
param
- parameterpublic void addParamInt64(long param)
param
- parameterpublic byte[] getBytes()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |