|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface represents IO items (tags) which represent values from PLC's, digital IO cards etc.
Field Summary | |
static int |
CACHE_READ
Specify CACHED read |
static int |
DATATYPE_BOOL
Value is of type Boolean - this type should be used when dealing with single bit values. |
static int |
DATATYPE_BOOLARRAY
Value is of type Boolean[]. |
static int |
DATATYPE_DATE
Value is of type Date. |
static int |
DATATYPE_DOUBLE
Value is of type Double. |
static int |
DATATYPE_DOUBLEARRAY
Value is of type Double[]. |
static int |
DATATYPE_FLOAT
Value is of type Float. |
static int |
DATATYPE_FLOATARRAY
Value is of type Integer[]. |
static int |
DATATYPE_INT
Value is of type Integer |
static int |
DATATYPE_INTARRAY
Value is of type Integer[]. |
static int |
DATATYPE_STRING
Value is of type String |
static int |
DATATYPE_USE_NATIVE
Value is automatically assigned according to what the IOServer suggests. |
static int |
DEVICE_READ
Specify DEVICE read |
Method Summary | |
String |
getActionCommand()
Returns the command name associated with this item. |
int |
getDataType()
Describes the data type of the value associated with this event. |
String |
getDescription()
Get descriptive text for this item |
IOGroup |
getGroup()
Get the group this item belongs to |
IOQuality |
getOldQuality()
Returns the quality of the last read value, ie. quality corresponding to the value returned from calling getOldValue() |
Object |
getOldValue()
Last value read from the device - can be used to efficiently read an item value when fired in an IOListener onDataChanged() event. |
Object |
getUserObject()
Returns a user object that may optionally having been assigned to this IOItem. |
boolean |
isActive()
Is the item active - ie. is it automatically being polled |
boolean |
isOldQualityGood()
Returns quality of last read value. |
Object |
readValue()
Read the item value from the device. |
Object |
readValue(int dataSource)
Read the item value from the device. |
void |
setActionCommand(String aCmd)
Set the command name associated with this item. |
void |
setDescription(String text)
Set descriptive text for this item |
void |
setUserObject(Object o)
Set optional user object associated with this IOItem. |
void |
writeIntValue(int value)
Deprecated. Replaced by writeValue(int). |
void |
writeValue(boolean value)
Write the specified value to the device. |
void |
writeValue(Boolean value)
Write the specified value to the device. |
void |
writeValue(boolean[] values)
Write the specified array of booleans to the device. |
void |
writeValue(double value)
Write the specified value to the device. |
void |
writeValue(Double value)
Write the specified value to the device. |
void |
writeValue(double[] values)
Write the specified array of doubles to the device. |
void |
writeValue(float value)
Write the specified value to the device. |
void |
writeValue(Float value)
Write the specified value to the device. |
void |
writeValue(float[] values)
Write the specified array of floats to the device. |
void |
writeValue(int value)
Write the specified value to the device. |
void |
writeValue(int[] values)
Write the specified array of integers to the device. |
void |
writeValue(Integer value)
Write the specified value to the device. |
void |
writeValue(String value)
Write the specified value to the device. |
Field Detail |
public static final int DATATYPE_USE_NATIVE
public static final int DATATYPE_BOOL
public static final int DATATYPE_INT
public static final int DATATYPE_FLOAT
public static final int DATATYPE_DOUBLE
public static final int DATATYPE_STRING
public static final int DATATYPE_DATE
public static final int DATATYPE_BOOLARRAY
public static final int DATATYPE_INTARRAY
public static final int DATATYPE_FLOATARRAY
public static final int DATATYPE_DOUBLEARRAY
public static final int CACHE_READ
readValue(int)
,
Constant Field Valuespublic static final int DEVICE_READ
readValue(int)
,
Constant Field ValuesMethod Detail |
public IOGroup getGroup()
public int getDataType()
public Object readValue() throws RbxIOException
RbxIOException
- thrown if the read operation failedpublic Object readValue(int dataSource) throws RbxIOException
dataSource
- The source to read from, ie. CACHE_READ or DEVICE_READ. A cache read
will obtain the current value for the item from the device server cache
(eg. OPC server). This is fast but the value is only updated with the
specified update rate, ie. a CACHE read is accurate to within the
'UpdateRate' of the group.RbxIOException
- thrown if the read operation failedpublic void writeIntValue(int value) throws RbxIOException
value
- The value to send to the device
RbxIOException
- thrown if the write operation failedpublic void writeValue(int value) throws RbxIOException
value
- The value to send to the device
RbxIOException
- thrown if the write operation failedpublic void writeValue(float value) throws RbxIOException
value
- The value to send to the device
RbxIOException
- thrown if the write operation failedpublic void writeValue(double value) throws RbxIOException
value
- The value to send to the device
RbxIOException
- thrown if the write operation failedpublic void writeValue(boolean value) throws RbxIOException
value
- The value to send to the device
RbxIOException
- thrown if the write operation failedpublic void writeValue(String value) throws RbxIOException
value
- The value to send to the device
RbxIOException
- thrown if the write operation failedpublic void writeValue(Integer value) throws RbxIOException
value
- The value to send to the device
RbxIOException
- thrown if the write operation failedpublic void writeValue(Boolean value) throws RbxIOException
value
- The value to send to the device
RbxIOException
- thrown if the write operation failedpublic void writeValue(Float value) throws RbxIOException
value
- The value to send to the device
RbxIOException
- thrown if the write operation failedpublic void writeValue(Double value) throws RbxIOException
value
- The value to send to the device
RbxIOException
- thrown if the write operation failedpublic void writeValue(int[] values) throws RbxIOException
values
- The array of integer values to send to the device
RbxIOException
- thrown if the write operation failedpublic void writeValue(float[] values) throws RbxIOException
values
- The array of float values to send to the device
RbxIOException
- thrown if the write operation failedpublic void writeValue(double[] values) throws RbxIOException
values
- The array of double values to send to the device
RbxIOException
- thrown if the write operation failedpublic void writeValue(boolean[] values) throws RbxIOException
values
- The array of boolean values to send to the device
RbxIOException
- thrown if the write operation failedpublic String getActionCommand()
public void setActionCommand(String aCmd)
aCmd
- any users defined string including nullpublic Object getOldValue()
public IOQuality getOldQuality()
getOldValue()
IOQuality
. Guaranteed
never to return null.public boolean isOldQualityGood()
getOldQuality()
and then investigate the
returned IOQuality
instance, since the implementation need
not create an IOQuality
instance to determine if the quality
is good or not.
IOQuality
public boolean isActive()
public void setDescription(String text)
text
- the description. If null then the action command string is returned
on calls to getDescription()getDescription()
public String getDescription()
setDescription(java.lang.String)
public Object getUserObject()
setUserObject(java.lang.Object)
public void setUserObject(Object o)
o
- the Object to associate with this item
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |