|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.netxms.base.NXCPMessage
public class NXCPMessage
Field Summary | |
---|---|
static int |
HEADER_SIZE
|
static int |
MF_BINARY
|
static int |
MF_CONTROL
|
static int |
MF_END_OF_FILE
|
static int |
MF_END_OF_SEQUENCE
|
static int |
MF_REVERSE_ORDER
|
Constructor Summary | |
---|---|
NXCPMessage(byte[] nxcpMessage)
Create NXCPMessage from binary NXCP message |
|
NXCPMessage(int msgCode)
|
|
NXCPMessage(int msgCode,
long msgId)
|
Method Summary | |
---|---|
byte[] |
createNXCPMessage()
|
NXCPVariable |
findVariable(long varId)
|
byte[] |
getBinaryData()
Get data of raw message. |
int |
getMessageCode()
|
long |
getMessageId()
|
long |
getTimestamp()
|
byte[] |
getVariableAsBinary(long varId)
|
boolean |
getVariableAsBoolean(long varId)
|
java.net.InetAddress |
getVariableAsInetAddress(long varId)
|
long |
getVariableAsInt64(long varId)
|
int |
getVariableAsInteger(long varId)
|
java.lang.Double |
getVariableAsReal(long varId)
|
java.lang.String |
getVariableAsString(long varId)
|
long[] |
getVariableAsUInt32Array(long varId)
|
java.lang.Long[] |
getVariableAsUInt32ArrayEx(long varId)
|
java.util.UUID |
getVariableAsUUID(long varId)
|
boolean |
isControlMessage()
Return true if message is a control message |
boolean |
isEndOfFile()
Return true if message has "end of file" flag set |
boolean |
isEndOfSequence()
Return true if message has "end of sequence" flag set |
boolean |
isRawMessage()
Return true if message is a raw message |
void |
setMessageCode(int msgCode)
|
void |
setMessageId(long msgId)
|
void |
setTimestamp(long timestamp)
|
void |
setVariable(long varId,
byte[] value)
|
void |
setVariable(long varId,
java.lang.Double value)
|
void |
setVariable(long varId,
java.net.InetAddress value)
|
void |
setVariable(long varId,
long[] value)
|
void |
setVariable(long varId,
java.lang.String value)
|
void |
setVariable(long varId,
java.util.UUID value)
|
void |
setVariable(NXCPVariable variable)
|
void |
setVariableInt16(long varId,
int value)
|
void |
setVariableInt32(long varId,
int value)
|
void |
setVariableInt64(long varId,
long value)
|
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_SIZE
public static final int MF_BINARY
public static final int MF_END_OF_FILE
public static final int MF_END_OF_SEQUENCE
public static final int MF_REVERSE_ORDER
public static final int MF_CONTROL
Constructor Detail |
---|
public NXCPMessage(int msgCode)
msgCode
- public NXCPMessage(int msgCode, long msgId)
msgCode
- msgId
- public NXCPMessage(byte[] nxcpMessage) throws java.io.IOException
nxcpMessage
- binary NXCP message
java.io.IOException
Method Detail |
---|
public int getMessageCode()
public void setMessageCode(int msgCode)
msgCode
- the msgCode to setpublic long getMessageId()
public void setMessageId(long msgId)
msgId
- the msgId to setpublic long getTimestamp()
public void setTimestamp(long timestamp)
timestamp
- the timestamp to setpublic NXCPVariable findVariable(long varId)
varId
- variable Id to findpublic void setVariable(NXCPVariable variable)
public void setVariable(long varId, byte[] value)
public void setVariable(long varId, long[] value)
public void setVariable(long varId, java.lang.String value)
public void setVariable(long varId, java.lang.Double value)
public void setVariable(long varId, java.net.InetAddress value)
public void setVariable(long varId, java.util.UUID value)
public void setVariableInt64(long varId, long value)
public void setVariableInt32(long varId, int value)
public void setVariableInt16(long varId, int value)
public byte[] getVariableAsBinary(long varId)
public java.lang.String getVariableAsString(long varId)
public java.lang.Double getVariableAsReal(long varId)
public int getVariableAsInteger(long varId)
public long getVariableAsInt64(long varId)
public java.net.InetAddress getVariableAsInetAddress(long varId)
public java.util.UUID getVariableAsUUID(long varId)
public long[] getVariableAsUInt32Array(long varId)
public java.lang.Long[] getVariableAsUInt32ArrayEx(long varId)
public boolean getVariableAsBoolean(long varId)
public byte[] createNXCPMessage() throws java.io.IOException
java.io.IOException
public byte[] getBinaryData()
public boolean isRawMessage()
public boolean isControlMessage()
public boolean isEndOfFile()
public boolean isEndOfSequence()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |