|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--cdev.Device
This class represents the device abstraction in the cdev Java paradigm. Devices have properties which can be set or retrieved via synchronous or asynchronous methods (determined by argument type):
Data
,
DeviceContext
Field Summary | |
static Data |
CONTROL_CTX
|
static Data |
MONITOR_CTX
|
static Data |
VALUE_CTX
|
Constructor Summary | |
Device(java.lang.String dname)
|
|
Device(java.lang.String dname,
ControlSystem sys)
|
Method Summary | |
DeviceError |
get(java.lang.String property,
Data result)
Initiate synchronous get of property value. |
void |
get(java.lang.String property,
DeviceListener listener)
Initiate asynchronous get of property value. |
DeviceError |
getCharacteristic(java.lang.String property,
java.lang.String characteristic,
Data data)
Initiate synchronous get value of a property's characteristic . |
void |
getCharacteristic(java.lang.String property,
java.lang.String characteristic,
DeviceListener listener)
Initiate an asynchronous get value of a property's characteristic. |
DeviceContext |
getContext()
Return a reference to the context associated with the device. |
ControlSystem |
getControlSystem()
Return the reference to the ControlSystem associated with the device. |
DeviceClass |
getDeviceClass()
Returns the reference to the deviceClass this device belongs to. |
java.lang.String |
getName()
Return the name of the device. |
DeviceError |
getReference(java.lang.String property,
Data result)
Initiate synchronous get of property reference value. |
void |
getReference(java.lang.String property,
DeviceListener listener)
Initiate asynchronous get of property reference value. |
java.lang.Object |
getServiceData()
|
void |
monitorOff(java.lang.String property,
DeviceListener listener)
Terminate asynchronous subscription to property value. |
void |
monitorOn(java.lang.String property,
DeviceListener listener)
Initiate asynchronous subscription to property value. |
boolean |
needCycleType()
Returns true if the I/O may require a cycle type. |
boolean |
needCycleType(java.lang.String propertyName)
Returns true if the I/O with this property requires a cycle type. |
void |
send(java.lang.String message,
Data data,
Callback handler)
Deprecated. Use send with DeviceListener instead. |
DeviceError |
send(java.lang.String message,
Data data,
Data result)
Initiate a synchronous "send" transaction. |
void |
send(java.lang.String message,
Data data,
DeviceListener listener)
Initiate a transaction that delivers results to a listener when the reply is returned from the server. |
void |
sendNoBlock(java.lang.String message,
Data data,
Data result)
Initiate asynchronous transaction that delivers data to Data object. |
DeviceError |
set(java.lang.String property,
Data data)
Initiate synchronous set of property value. |
void |
set(java.lang.String property,
Data data,
DeviceListener listener)
Initiate asynchronous set of property value. |
void |
setContext(Data data)
(Deprecated; use setContext (DeviceContext ctx) instead) Set the context for the device. |
void |
setContext(DeviceContext ctx)
Set the context for the device. |
DeviceError |
setReference(java.lang.String property,
Data data)
Initiate synchronous set of property reference value. |
void |
setReference(java.lang.String property,
Data data,
DeviceListener listener)
Initiate asynchronous set of property reference value. |
void |
setServiceData(java.lang.Object sd)
|
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static Data CONTROL_CTX
public static Data MONITOR_CTX
public static Data VALUE_CTX
Constructor Detail |
public Device(java.lang.String dname) throws java.io.IOException
public Device(java.lang.String dname, ControlSystem sys) throws java.io.IOException
Method Detail |
public void get(java.lang.String property, DeviceListener listener) throws java.io.IOException
property
- The name of the propertylistener
- Reference to the device listener to receive valuepublic DeviceError get(java.lang.String property, Data result) throws java.io.IOException
property
- The name of the propertyresult
- Reference to the data object to receive the resultpublic void set(java.lang.String property, Data data, DeviceListener listener) throws java.io.IOException
property
- The name of the propertydata
- Data object containing the value.listener
- The device listener object to receive the response.public DeviceError set(java.lang.String property, Data data) throws java.io.IOException
property
- The name of the propertydata
- Data object containing the value.public void monitorOn(java.lang.String property, DeviceListener listener) throws java.io.IOException
property
- The name of the propertylistener
- Reference to the device listener to receive the resultspublic void monitorOff(java.lang.String property, DeviceListener listener) throws java.io.IOException
property
- The name of the propertylistener
- Reference to the device listener to receive the resultspublic void send(java.lang.String message, Data data, DeviceListener listener) throws java.io.IOException
message
- The message to send to the server.dataIn
- The data to send with the message.listener
- The listener object to receive results.public DeviceError send(java.lang.String message, Data data, Data result) throws java.io.IOException
message
- The message to send to the server.data
- The data to send with the message.result
- Reference to data to return from the server.public void sendNoBlock(java.lang.String message, Data data, Data result) throws java.io.IOException
message
- The message to send to the server.data
- The data to send with the message.result
- Reference to data to receive result from the server.public void send(java.lang.String message, Data data, Callback handler) throws java.io.IOException
public DeviceError getReference(java.lang.String property, Data result) throws java.io.IOException
property
- The name of the propertyresult
- Reference to the data object to receive the resultpublic void getReference(java.lang.String property, DeviceListener listener) throws java.io.IOException
property
- The name of the propertylistener
- Reference to the device listener to receive valuepublic void setReference(java.lang.String property, Data data, DeviceListener listener) throws java.io.IOException
property
- The name of the propertydata
- Data object containing the value.listener
- The device listener object to receive the response.public DeviceError setReference(java.lang.String property, Data data) throws java.io.IOException
property
- The name of the propertydata
- Data object containing the value.public DeviceError getCharacteristic(java.lang.String property, java.lang.String characteristic, Data data) throws java.io.IOException
property
- The name of the propertycharacteristic
- The name of the characteristicdata
- Data object containing the value returned.public void getCharacteristic(java.lang.String property, java.lang.String characteristic, DeviceListener listener) throws java.io.IOException
property
- The name of the propertycharacteristic
- The name of the characteristiclistener
- The device listener object to receive the response.public java.lang.String getName()
public ControlSystem getControlSystem()
public DeviceContext getContext()
public void setContext(DeviceContext ctx)
ctx
- Data object containing context itemspublic void setContext(Data data)
data
- Data object containing context itemspublic java.lang.Object getServiceData()
public void setServiceData(java.lang.Object sd)
public DeviceClass getDeviceClass() throws DataNotFoundException
public boolean needCycleType() throws DataNotFoundException
public boolean needCycleType(java.lang.String propertyName) throws DataNotFoundException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |