Channel
represents a single connection to the underlying system.
More...
Inherited by de.desy.tine.accesslayer.TINEChannel.
Public Member Functions | |
ChannelCallback | getCallback () |
String | getName () |
TFormat | getOutputFormat () |
Returns the output data format. More... | |
int | getOutputSize () |
Returns the output data size. More... | |
long | getRate () |
Returns the refresh rate in milliseconds at which this channel sends updates to the registered callback. More... | |
ConnectionMode | getMode () |
Returns the connection mode of this channel. More... | |
Object | getValue () |
Returns the value as received from the underlying system. More... | |
TDataType | getRawValue () |
Returns the raw data object. More... | |
void | setValue (Object value) throws ConnectionException |
Sets the value to the underlying channel. More... | |
void | setValueSync (Object value) throws ConnectionException |
Synchronously sets the value to the underlying channel. More... | |
void | setValue (Object value, TDataType outValue, int timeout) throws ConnectionException |
Sets the value to the underlying channel. More... | |
void | setValueSync (Object value, TDataType outValue, int timeout) throws ConnectionException |
Synchronously sets the value to the underlying channel. More... | |
int | getStatus () |
Returns the tine link status as received from the underlying system. More... | |
String | getStatusString () |
Returns the status code as a string. More... | |
void | stop () |
Close this channel and stop sending updates. | |
boolean | isStopped () |
Channel
represents a single connection to the underlying system.
It receives notifications according to the specified rate and or mode. The channel can always be asked for the value or status in which case it will return the latest value or status that it received. It also provides means to set the value. In this case it is expected that the set value is acceptable by the underlying system, otherwise an exception will be thrown or the callback will receive an error update. When the channel is no longer used it should be closed, which will disconnect it from the underlying system and free all resources. If the channel has been closed it can no longer be reopened.
ChannelCallback de.desy.tine.accesslayer.Channel.getCallback | ( | ) |
ConnectionMode de.desy.tine.accesslayer.Channel.getMode | ( | ) |
Returns the connection mode of this channel.
String de.desy.tine.accesslayer.Channel.getName | ( | ) |
TFormat de.desy.tine.accesslayer.Channel.getOutputFormat | ( | ) |
Returns the output data format.
The return value of getValue() will be of the array type that is suggested by this output format.
int de.desy.tine.accesslayer.Channel.getOutputSize | ( | ) |
Returns the output data size.
The return value of getValue() will have the array size equals to this output size.
long de.desy.tine.accesslayer.Channel.getRate | ( | ) |
Returns the refresh rate in milliseconds at which this channel sends updates to the registered callback.
TDataType de.desy.tine.accesslayer.Channel.getRawValue | ( | ) |
Returns the raw data object.
Referenced by de.desy.tine.accesslayer.ChannelFactory.getRawValue().
int de.desy.tine.accesslayer.Channel.getStatus | ( | ) |
Returns the tine link status as received from the underlying system.
In most cases the status can be converted into a readable string by TErrorList#toString(int), but if the code is non-standard a better result can be obtained by calling getStatusString().
Referenced by de.desy.tine.accesslayer.ChannelFactory.getRawValue().
String de.desy.tine.accesslayer.Channel.getStatusString | ( | ) |
Returns the status code as a string.
In most cases this is a TErrorList#toString(int). However, if the code is not standard, this is an arbitrary string provided by the server that this channel is connected to.
Referenced by de.desy.tine.accesslayer.ChannelFactory.getRawValue().
Object de.desy.tine.accesslayer.Channel.getValue | ( | ) |
Returns the value as received from the underlying system.
boolean de.desy.tine.accesslayer.Channel.isStopped | ( | ) |
void de.desy.tine.accesslayer.Channel.setValue | ( | Object | value | ) | throws ConnectionException |
Sets the value to the underlying channel.
value | the value to set |
ConnectionException | if the write action failed |
void de.desy.tine.accesslayer.Channel.setValue | ( | Object | value, |
TDataType | outValue, | ||
int | timeout | ||
) | throws ConnectionException |
Sets the value to the underlying channel.
value | the value to set |
outValue | the data type that will receive the readback value after write is completed |
timeout | the timeout in milliseconds |
ConnectionException | if the write action failed |
void de.desy.tine.accesslayer.Channel.setValueSync | ( | Object | value | ) | throws ConnectionException |
Synchronously sets the value to the underlying channel.
value | the value to set |
ConnectionException | if the write action failed |
void de.desy.tine.accesslayer.Channel.setValueSync | ( | Object | value, |
TDataType | outValue, | ||
int | timeout | ||
) | throws ConnectionException |
Synchronously sets the value to the underlying channel.
value | the value to set |
outValue | the data type that will receive the readback value after write is completed |
timeout | the timeout in milliseconds |
ConnectionException | if the write action failed |