public final class JNRPEResponse extends Object
Constructor and Description |
---|
JNRPEResponse()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
getCRC()
Returns the packet CRC value.
|
PacketType |
getPacketType()
Returns the packet type.
|
PacketVersion |
getPacketVersion()
Returns the packet version.
|
int |
getResultCode()
Returns the result code.
|
String |
getStringMessage()
Returns the string message.
|
void |
setCRC(int iCRC)
Sets the CRC value.
|
void |
setMessage(String sMessage)
Sets the message to be included in the response.
|
void |
setPacketVersion(PacketVersion version)
Sets the packet version.
|
void |
setResultCode(int status)
Sets the result code.
|
byte[] |
toByteArray()
Converts the packet object to its byte array representation.
|
void |
updateCRC()
Updates the CRC value.
|
void |
validate()
Validates the packet CRC.
|
public void updateCRC()
public void setMessage(String sMessage)
sMessage
- public int getCRC()
public PacketType getPacketType()
public PacketVersion getPacketVersion()
public void setCRC(int iCRC)
iCRC
- The new CRC valuepublic void setPacketVersion(PacketVersion version)
version
- The packet versionpublic int getResultCode()
public void setResultCode(int status)
status
- The new result codepublic void validate() throws BadCRCException
BadCRCException
- If the CRC can't be validatedpublic byte[] toByteArray()
public String getStringMessage()
Copyright © 2013. All Rights Reserved.