|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.eurotech.framework.protocol.pcn.SnpMessage
public class SnpMessage
Defines SNP Message (Simple Network Protocol)
Field Summary | |
---|---|
static int |
SNP_HEADER_LENGTH
|
static int |
SNP_PREAMBLE_LENGTH
|
Constructor Summary | |
---|---|
SnpMessage(ArrayList msg)
SnpMessage - Reply constructor |
|
SnpMessage(int src,
int dst)
SnpMessage constructor |
|
SnpMessage(int src,
int dst,
String command)
Short SNP message constructor |
|
SnpMessage(int src,
int dst,
String command,
ArrayList paramlist)
SnpMessage constructor |
|
SnpMessage(String error)
SnpMessage - Error constructor |
Method Summary | |
---|---|
void |
display()
Displays SNP message. |
byte[] |
getBytes()
Answers byte array of the SNP message. |
String |
getCommand()
Reports SNP command. |
int |
getDataLength()
Reports data length. |
int |
getDstAddress()
Reports SNP destination address. |
String |
getError()
Reports error message. |
ArrayList |
getMsg()
Reports SNP message. |
int |
getPacketNo()
Reports packet number. |
byte[] |
getPayload()
Reports SNP message payload. |
String |
getPayloadString()
Reports SNP message payload. |
int |
getSrcAddress()
Reports SNP source address. |
int |
getTotPacketNo()
Reports total packet number. |
boolean |
isPoll()
|
boolean |
validCrc16()
Reports if CRC16 of the reply message is valid |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int SNP_HEADER_LENGTH
public static final int SNP_PREAMBLE_LENGTH
Constructor Detail |
---|
public SnpMessage(int src, int dst) throws EsfException
src
- - source address as int
dst
- - destination address as int
EsfException
public SnpMessage(int src, int dst, String command) throws EsfException
int
- src - source address as int
int
- dst - destination address as int
String
- command - SNP command as String
EsfException
public SnpMessage(ArrayList msg) throws EsfException
msg
- - reply message as ArrayList
EsfException
public SnpMessage(String error)
String
- error as String
public SnpMessage(int src, int dst, String command, ArrayList paramlist) throws EsfException
int
- src - source address as int
int
- dst - destination address as int
String
- command - SNP command as String
ArrayList
- paramlist - list of parameters as ArrayList
EsfException
Method Detail |
---|
public byte[] getBytes() throws EsfException
EsfException
public boolean validCrc16() throws EsfException
boolean
EsfException
public boolean isPoll()
public void display()
public String getCommand()
String
public int getSrcAddress()
int
public int getDstAddress()
int
public int getTotPacketNo()
int
public int getPacketNo()
int
public int getDataLength()
int
public String getError()
String
public ArrayList getMsg()
String
public byte[] getPayload()
byte[]
public String getPayloadString()
String
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |