Main Page | Features | Central Services | csv-Files | Types | Transfer | Access | API-C | API-VB/ActiveX | API-Java | Examples | Downloads
Public Member Functions
de.desy.tine.server.devices.TDevice Class Reference

Instances of devices served by a device server should inherit from TDevice. More...

List of all members.

Public Member Functions

TAlarm setAlarm (int code)
 Sets an alarm with the given code.
TAlarm setAlarm (int code, byte[] data)
 Sets an alarm with the given data set.
TAlarm setAlarm (int code, TDataType data)
 Sets an alarm with the given data set.
TAlarm setAlarm (int code, float data)
 Sets an alarm with the given data set.
TAlarm setAlarm (int code, int data)
 Sets an alarm with the given data set.
TAlarm setAlarm (int code, short[] data)
 Sets an alarm with the given data set.
TAlarm setAlarm (int code, byte[] data, short flags)
 Sets an alarm with the given data set and given flags.
void clearAlarms ()
 Clears all alarms in the local alarm server's list.
void clearAlarm (int code)
 Clears the alarm with the given code in the local alarm server's list.
void removeAlarm (int code)
 Removes the alarm with the given code from the local alarm server's list.
 TDevice (String name, int number)
 Simple constructor which assigns a device name and number.
 TDevice (int number)
 Simple constructor which assigns a device number.
 TDevice (String name, int number, TEquipmentModule equipmentModule)
 Complex constructor which assigns name, number, and equipment module.
String getName ()
 Returns the registered device name.
void setName (String name)
 Sets the device name for this device.
String getRedirection ()
 Returns the redirection string associated with this device.
void setRedirection (String redirection)
 Sets a redirection string to apply to this device.
String getDescription ()
 Gets the assigned description for this device.
void setDescription (String description)
 Sets a description for this device.

Detailed Description

Instances of devices served by a device server should inherit from TDevice.

Author:
duval

Constructor & Destructor Documentation

de.desy.tine.server.devices.TDevice.TDevice ( String  name,
int  number 
)

Simple constructor which assigns a device name and number.

Use this constructor if you do not make use of a '<local-names>-devices.csv' but instead either read your own database to determine the device name name list. You can assign a number and name to the device in question.

Parameters:
nameThe device name to apply to this device
numberThe device number to apply to this device
de.desy.tine.server.devices.TDevice.TDevice ( int  number)

Simple constructor which assigns a device number.

Use this constructor if you make use of a '<local-names>-devices.csv' configuration file to register devices or if you intend on using the setName() method to attach a name to the device.

Parameters:
numberThe device number associated with this device
de.desy.tine.server.devices.TDevice.TDevice ( String  name,
int  number,
TEquipmentModule  equipmentModule 
)

Complex constructor which assigns name, number, and equipment module.

You should not normally need to make use of this constructor, as the identity of the equipment module is usually determined elsewhere during initialization.

Parameters:
nameThe device name associated with this device
numberThe device number associated with this device
equipmentModuleThe equipment module to associate with this device

Member Function Documentation

void de.desy.tine.server.devices.TDevice.clearAlarm ( int  code)

Clears the alarm with the given code in the local alarm server's list.

The alarm's clear counter will be incremented. A call to clearAlarm() will not cause the alarm to be removed from the list until the clear counter is greater than 8.

Parameters:
codeIs the alarm code specifying which alarm to clear
void de.desy.tine.server.devices.TDevice.clearAlarms ( )

Clears all alarms in the local alarm server's list.

String de.desy.tine.server.devices.TDevice.getDescription ( )

Gets the assigned description for this device.

A device description can be assigned to a specific device. This method call returns the assigned description.

String de.desy.tine.server.devices.TDevice.getName ( )

Returns the registered device name.

Returns:
The registered device name
String de.desy.tine.server.devices.TDevice.getRedirection ( )

Returns the redirection string associated with this device.

Returns:
the redirection string associated with this device
void de.desy.tine.server.devices.TDevice.removeAlarm ( int  code)

Removes the alarm with the given code from the local alarm server's list.

Parameters:
codeIs the alarm code specifying which alarm to remove from the local alarm server's list
TAlarm de.desy.tine.server.devices.TDevice.setAlarm ( int  code,
int  data 
)

Sets an alarm with the given data set.

Parameters:
codeThe alarm code to apply to the alarm
dataThe alarm data associated with the alarm
Returns:
TAlarm de.desy.tine.server.devices.TDevice.setAlarm ( int  code)

Sets an alarm with the given code.

Parameters:
codeThe alarm code to apply to the alarm
Returns:
TAlarm de.desy.tine.server.devices.TDevice.setAlarm ( int  code,
byte[]  data,
short  flags 
)

Sets an alarm with the given data set and given flags.

On rare occasions you might want to apply the alarm descriptor flags yourself in a call to setAlarms().

Parameters:
codeThe alarm code to apply to the alarm
dataThe alarm data associated with the alarm
flagsThe alarm descriptor to apply to the alarm
Returns:
TAlarm de.desy.tine.server.devices.TDevice.setAlarm ( int  code,
byte[]  data 
)

Sets an alarm with the given data set.

Parameters:
codeThe alarm code to apply to the alarm
dataThe alarm data associated with the alarm
Returns:
TAlarm de.desy.tine.server.devices.TDevice.setAlarm ( int  code,
float  data 
)

Sets an alarm with the given data set.

Parameters:
codeThe alarm code to apply to the alarm
dataThe alarm data associated with the alarm
Returns:
TAlarm de.desy.tine.server.devices.TDevice.setAlarm ( int  code,
TDataType  data 
)

Sets an alarm with the given data set.

Parameters:
codeThe alarm code to apply to the alarm
dataThe alarm data associated with the alarm
Returns:
TAlarm de.desy.tine.server.devices.TDevice.setAlarm ( int  code,
short[]  data 
)

Sets an alarm with the given data set.

Parameters:
codeThe alarm code to apply to the alarm
dataThe alarm data associated with the alarm
Returns:
void de.desy.tine.server.devices.TDevice.setDescription ( String  description)

Sets a description for this device.

A device description can be assigned to a specific device via this method call.

Parameters:
descriptionThe description to be applied to this device.
void de.desy.tine.server.devices.TDevice.setName ( String  name)

Sets the device name for this device.

Parameters:
nameThe device name to associate with this device
void de.desy.tine.server.devices.TDevice.setRedirection ( String  redirection)

Sets a redirection string to apply to this device.

If the device has a redirection string associated with it, then all remote requests for properties for this device will be redirected to the remote device server given in the redirection string.

Parameters:
redirectionThe redirection string of the general form '/<context>/<server>/<device name>="">[property]'. In this case, ONLY the '<server>' element is relevant.

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