public class IOValue extends Object
Modifier and Type | Field and Description |
---|---|
static int |
DATATYPE_BOOLEAN
Match the eWON "Boolean" tag type.
|
static int |
DATATYPE_FLOAT32
Match the eWON "Floating point" tag type.
|
static int |
DATATYPE_INT32
Match the eWON "Integer" tag type.
|
static int |
DATATYPE_UINT32
Match the eWON "DWord" tag type.
|
Constructor and Description |
---|
IOValue(int dataType)
Creates an IOValue object.
This object holds an IO Value with a given datatype. The data type is defined when the object is created and this type will define how the internal value is stored. |
Modifier and Type | Method and Description |
---|---|
boolean |
getBoolean()
Internal: read the IOValue value as Boolean (it must contain that type - no conversion done).
|
int |
getDataType() |
float |
getFloat32()
Internal: read the IOValue value as Float32 (it must contain that type - no conversion done).
|
int |
getInt32()
Internal: read the IOValue value as Int32 (it must contain that type - no conversion done).
|
long |
getUInt32()
Internal: read the IOValue value as UInt32 (it must contain that type - no conversion done).
|
static boolean |
isDataTypeValid(int dataType)
Validates a DataType value.
|
void |
setBoolean(boolean value)
Internal: Write an Boolean in the IOValue value (it must contain that type - no conversion done).
|
void |
setFloat32(float value)
Internal: Write an Float32 in the IOValue value (it must contain that type - no conversion done).
|
void |
setInt32(int value)
Internal: Write an Int32 in the IOValue value (it must contain that type - no conversion done).
|
void |
setUInt32(long value)
Internal: Write an UInt32 in the IOValue value (it must contain that type - no conversion done).
|
public static final int DATATYPE_BOOLEAN
public static final int DATATYPE_FLOAT32
public static final int DATATYPE_INT32
public static final int DATATYPE_UINT32
public IOValue(int dataType)
dataType
- One of DATATYPE_BOOLEAN
, DATATYPE_FLOAT32
, DATATYPE_INT32
and DATATYPE_UINT32
..public static boolean isDataTypeValid(int dataType)
dataType
- One of DATATYPE_BOOLEAN
, DATATYPE_FLOAT32
, DATATYPE_INT32
and DATATYPE_UINT32
.public int getDataType()
public long getUInt32()
public int getInt32()
public float getFloat32()
public boolean getBoolean()
public void setUInt32(long value)
value
- to write in IOValue internal storage.public void setInt32(int value)
value
- to write in IOValue internal storage.public void setFloat32(float value)
value
- to write in IOValue internal storage.public void setBoolean(boolean value)
value
- to write in IOValue internal storage.