Main Page | Features | Central Services | csv-Files | Types | Transfer | Access | API-C | API-.NET | API-Java | Examples | Downloads
page generated on 31.05.2023 - 04:45
Public Member Functions | List of all members
de.desy.tine.accesslayer.Channel Interface Reference

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 ()
 

Detailed Description

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.

Author
Jaka Bobnar

Member Function Documentation

◆ getCallback()

ChannelCallback de.desy.tine.accesslayer.Channel.getCallback ( )
Returns
the callback registered with this channel

◆ getMode()

ConnectionMode de.desy.tine.accesslayer.Channel.getMode ( )

Returns the connection mode of this channel.

Returns
the connection mode

◆ getName()

String de.desy.tine.accesslayer.Channel.getName ( )
Returns
the full name of this channel

◆ getOutputFormat()

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.

Returns
output data format

◆ getOutputSize()

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.

Returns
output data size

◆ getRate()

long de.desy.tine.accesslayer.Channel.getRate ( )

Returns the refresh rate in milliseconds at which this channel sends updates to the registered callback.

Returns
refresh rate

◆ getRawValue()

TDataType de.desy.tine.accesslayer.Channel.getRawValue ( )

Returns the raw data object.

Returns
the raw data object

Referenced by de.desy.tine.accesslayer.ChannelFactory.getRawValue().

◆ getStatus()

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().

Returns
the link status

Referenced by de.desy.tine.accesslayer.ChannelFactory.getRawValue().

◆ getStatusString()

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.

Returns
the status as a string

Referenced by de.desy.tine.accesslayer.ChannelFactory.getRawValue().

◆ getValue()

Object de.desy.tine.accesslayer.Channel.getValue ( )

Returns the value as received from the underlying system.

Returns
value

◆ isStopped()

boolean de.desy.tine.accesslayer.Channel.isStopped ( )
Returns
true if this channel has been closed or false if it is still alive

◆ setValue() [1/2]

void de.desy.tine.accesslayer.Channel.setValue ( Object  value) throws ConnectionException

Sets the value to the underlying channel.

Parameters
valuethe value to set
Exceptions
ConnectionExceptionif the write action failed

◆ setValue() [2/2]

void de.desy.tine.accesslayer.Channel.setValue ( Object  value,
TDataType  outValue,
int  timeout 
) throws ConnectionException

Sets the value to the underlying channel.

Parameters
valuethe value to set
outValuethe data type that will receive the readback value after write is completed
timeoutthe timeout in milliseconds
Exceptions
ConnectionExceptionif the write action failed

◆ setValueSync() [1/2]

void de.desy.tine.accesslayer.Channel.setValueSync ( Object  value) throws ConnectionException

Synchronously sets the value to the underlying channel.

Parameters
valuethe value to set
Exceptions
ConnectionExceptionif the write action failed

◆ setValueSync() [2/2]

void de.desy.tine.accesslayer.Channel.setValueSync ( Object  value,
TDataType  outValue,
int  timeout 
) throws ConnectionException

Synchronously sets the value to the underlying channel.

Parameters
valuethe value to set
outValuethe data type that will receive the readback value after write is completed
timeoutthe timeout in milliseconds
Exceptions
ConnectionExceptionif the write action failed

The documentation for this interface was generated from the following file: