public class NXCPVariable
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static int |
TYPE_BINARY |
static int |
TYPE_FLOAT |
static int |
TYPE_INT16 |
static int |
TYPE_INT64 |
static int |
TYPE_INTEGER |
static int |
TYPE_STRING |
| Constructor and Description |
|---|
NXCPVariable(byte[] nxcpDataField)
Create NXCPVariable from NXCP message data field
|
NXCPVariable(long varId,
byte[] value) |
NXCPVariable(long varId,
java.lang.Double value) |
NXCPVariable(long varId,
java.net.InetAddress value) |
NXCPVariable(long varId,
int varType,
java.lang.Long value) |
NXCPVariable(long varId,
long[] value)
Create binary variable from long[]
|
NXCPVariable(long varId,
java.lang.Long[] value)
Create binary variable from Long[]
|
NXCPVariable(long varId,
java.lang.String value) |
NXCPVariable(long varId,
java.util.UUID value) |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
createNXCPDataField()
Create NXCP DF structure
|
byte[] |
getAsBinary()
Get variable's value as byte array
|
java.net.InetAddress |
getAsInetAddress()
Get variable's value as IP address
|
java.lang.Long |
getAsInteger()
Get variable's value as long integer
|
java.lang.Double |
getAsReal()
Get variable's value as floating point number
|
java.lang.String |
getAsString()
Get variable's value as string
|
long[] |
getAsUInt32Array()
Get variable's value as array of long integers.
|
java.lang.Long[] |
getAsUInt32ArrayEx()
Get variable's value as array of long integers.
|
java.util.UUID |
getAsUUID()
Get variable's value as UUID
|
long |
getVariableId() |
int |
getVariableType() |
void |
setVariableId(long variableId) |
java.lang.String |
toString() |
public static final int TYPE_INTEGER
public static final int TYPE_STRING
public static final int TYPE_INT64
public static final int TYPE_INT16
public static final int TYPE_BINARY
public static final int TYPE_FLOAT
public NXCPVariable(long varId,
int varType,
java.lang.Long value)
varId - varType - value - public NXCPVariable(long varId,
java.lang.String value)
varId - value - public NXCPVariable(long varId,
java.lang.Double value)
varId - value - public NXCPVariable(long varId,
byte[] value)
varId - value - public NXCPVariable(long varId,
long[] value)
varId - Variable IDvalue - Valuepublic NXCPVariable(long varId,
java.lang.Long[] value)
varId - Variable IDvalue - Valuepublic NXCPVariable(long varId,
java.net.InetAddress value)
varId - value - public NXCPVariable(long varId,
java.util.UUID value)
varId - value - public NXCPVariable(byte[] nxcpDataField)
throws java.io.IOException
nxcpDataField - java.io.IOExceptionpublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.Long getAsInteger()
public java.lang.Double getAsReal()
public java.lang.String getAsString()
public byte[] getAsBinary()
public java.net.InetAddress getAsInetAddress()
public java.util.UUID getAsUUID()
public long[] getAsUInt32Array()
public java.lang.Long[] getAsUInt32ArrayEx()
public long getVariableId()
public void setVariableId(long variableId)
variableId - the variableId to setpublic int getVariableType()
public byte[] createNXCPDataField()
throws java.io.IOException
java.io.IOExceptionCopyright © 2014. All Rights Reserved.