public class MoppyMessage extends Object
Modifier and Type | Class and Description |
---|---|
static class |
MoppyMessage.CommandByte |
Modifier and Type | Field and Description |
---|---|
static byte |
START_BYTE |
static MoppyMessage |
SYS_PING |
static MoppyMessage |
SYS_RESET |
static MoppyMessage |
SYS_START |
static MoppyMessage |
SYS_STOP |
static byte |
SYSTEM_ADDRESS |
Modifier | Constructor and Description |
---|---|
protected |
MoppyMessage(byte[] messageBytes) |
Modifier and Type | Method and Description |
---|---|
byte |
getDeviceAddress()
Returns target device address from the message
|
byte[] |
getMessageBody()
Returns the body of the message which includes the command byte and any additional bytes of command payload
|
byte[] |
getMessageBytes()
Returns raw bytes that make up the message
|
byte |
getMessageCommandByte() |
byte[] |
getMessageCommandPayload()
Returns just the variable command payload at the end of the message (may be zero-length!)
|
byte |
getSubAddress() |
boolean |
isSystemMessage() |
public static final byte START_BYTE
public static final byte SYSTEM_ADDRESS
public static final MoppyMessage SYS_PING
public static final MoppyMessage SYS_RESET
public static final MoppyMessage SYS_START
public static final MoppyMessage SYS_STOP
public byte[] getMessageBytes()
public byte getDeviceAddress()
public boolean isSystemMessage()
public byte getSubAddress()
public byte[] getMessageBody()
public byte getMessageCommandByte()
public byte[] getMessageCommandPayload()