|
eWON JTK | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ewon.ewonitf.IOValue
public class IOValue
IOValue is a class used to hold a tag value that is exchanged between the Java IOServer
and the eWON core and the other way round.
This object needs to hold the tag value with one of the types recognised by the eWON (Float, Integer, DWord, Boolean).
Field Summary | |
---|---|
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 Summary | |
---|---|
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. |
Method Summary | |
---|---|
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). |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int DATATYPE_BOOLEAN
public static final int DATATYPE_FLOAT32
public static final int DATATYPE_INT32
public static final int DATATYPE_UINT32
Constructor Detail |
---|
public IOValue(int dataType)
dataType
- One of DATATYPE_BOOLEAN
, DATATYPE_FLOAT32
, DATATYPE_INT32
and DATATYPE_UINT32
..Method Detail |
---|
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.
|
eWON JTK | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |