public class NXCPMessageField extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
TYPE_BINARY |
static int |
TYPE_FLOAT |
static int |
TYPE_INETADDR |
static int |
TYPE_INT16 |
static int |
TYPE_INT64 |
static int |
TYPE_INTEGER |
static int |
TYPE_STRING |
| Constructor and Description |
|---|
NXCPMessageField(byte[] nxcpDataField)
Create NXCPVariable from NXCP message data field
|
NXCPMessageField(long varId,
byte[] value) |
NXCPMessageField(long varId,
Double value) |
NXCPMessageField(long varId,
InetAddress value) |
NXCPMessageField(long varId,
InetAddressEx value) |
NXCPMessageField(long varId,
int varType,
Long value) |
NXCPMessageField(long varId,
long[] value)
Create binary variable from long[]
|
NXCPMessageField(long varId,
Long[] value)
Create binary variable from Long[]
|
NXCPMessageField(long varId,
String value) |
NXCPMessageField(long varId,
UUID value) |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
createNXCPDataField()
Create NXCP DF structure
|
byte[] |
getAsBinary()
Get variable's value as byte array
|
InetAddress |
getAsInetAddress()
Get field's value as IP address
|
InetAddressEx |
getAsInetAddressEx()
Get field's value as IP address/mask pair
|
Long |
getAsInteger()
Get variable's value as long integer
|
Double |
getAsReal()
Get variable's value as floating point number
|
String |
getAsString()
Get variable's value as string
|
long[] |
getAsUInt32Array()
Get variable's value as array of long integers.
|
Long[] |
getAsUInt32ArrayEx()
Get variable's value as array of long integers.
|
UUID |
getAsUUID()
Get variable's value as UUID
|
long |
getVariableId() |
int |
getVariableType() |
void |
setVariableId(long variableId) |
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 static final int TYPE_INETADDR
public NXCPMessageField(long varId,
int varType,
Long value)
varId - varType - value - public NXCPMessageField(long varId,
String value)
varId - value - public NXCPMessageField(long varId,
Double value)
varId - value - public NXCPMessageField(long varId,
byte[] value)
varId - value - public NXCPMessageField(long varId,
long[] value)
varId - Variable IDvalue - Valuepublic NXCPMessageField(long varId,
Long[] value)
varId - Variable IDvalue - Valuepublic NXCPMessageField(long varId,
InetAddress value)
varId - value - public NXCPMessageField(long varId,
InetAddressEx value)
varId - value - public NXCPMessageField(long varId,
UUID value)
varId - value - public NXCPMessageField(byte[] nxcpDataField)
throws IOException
nxcpDataField - IOExceptionpublic Long getAsInteger()
public Double getAsReal()
public String getAsString()
public byte[] getAsBinary()
public InetAddress getAsInetAddress()
public InetAddressEx getAsInetAddressEx()
public UUID getAsUUID()
public long[] getAsUInt32Array()
public Long[] getAsUInt32ArrayEx()
public long getVariableId()
public void setVariableId(long variableId)
variableId - the variableId to setpublic int getVariableType()
public byte[] createNXCPDataField()
throws IOException
IOExceptionCopyright © 2018. All rights reserved.