Instances of devices served by a device server should inherit from TDevice. More...
Public Member Functions | |
String | getLocation () |
void | setLocation (String location) |
Assigns a location text string to this device. More... | |
float | getZposition () |
void | setZposition (float zpos) |
Assigns a Z or longitudinal position for this device. More... | |
int | getMask () |
boolean | isMaskSet (int mask) |
Determines whether this device will be returned in a query containing the given mask. More... | |
void | setMask (int mask) |
Assigns a device mask to this device. More... | |
boolean | isOffline () |
void | setOffline (boolean offline) |
Set this device off-line (true) or on-line (false). More... | |
void | setPropertyList (String[] prpList) |
Assigns a list of registered properties to this device. More... | |
TAlarm | setAlarm (int code) |
Sets an alarm with the given code. More... | |
TAlarm | setAlarm (int code, byte[] data) |
Sets an alarm with the given data set. More... | |
TAlarm | setAlarm (int code, TDataType data) |
Sets an alarm with the given data set. More... | |
TAlarm | setAlarm (int code, float data) |
Sets an alarm with the given data set. More... | |
TAlarm | setAlarm (int code, int data) |
Sets an alarm with the given data set. More... | |
TAlarm | setAlarm (int code, short[] data) |
Sets an alarm with the given data set. More... | |
TAlarm | setAlarm (int code, byte[] data, short flags) |
Sets an alarm with the given data set and given flags. More... | |
void | clearAlarms () |
Clears all alarms in the local alarm server's list. More... | |
void | clearAlarm (int code) |
Clears the alarm with the given code in the local alarm server's list. More... | |
void | removeAlarm (int code) |
Removes the alarm with the given code from the local alarm server's list. More... | |
TDevice (String name, int number) | |
Simple constructor which assigns a device name and number. More... | |
TDevice (int number) | |
Simple constructor which assigns a device number. More... | |
TDevice (String name, int number, TEquipmentModule equipmentModule) | |
Complex constructor which assigns name, number, and equipment module. More... | |
String | getName () |
Returns the registered device name. More... | |
void | setName (String name) |
Sets the device name for this device. More... | |
String | getRedirection () |
Returns the redirection string associated with this device. More... | |
void | setRedirection (String redirection) |
Sets a redirection string to apply to this device. More... | |
String | getDescription () |
Gets the assigned description for this device. More... | |
void | setDescription (String description) |
Sets a description for this device. More... | |
Instances of devices served by a device server should inherit from TDevice.
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.
name | The device name to apply to this device |
number | The 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.
number | The 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.
name | The device name associated with this device |
number | The device number associated with this device |
equipmentModule | The equipment module to associate with this device |
References de.desy.tine.server.equipment.TEquipmentModule.getRegisteredNetsFromFile().
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.
code | Is 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.getLocation | ( | ) |
int de.desy.tine.server.devices.TDevice.getMask | ( | ) |
String de.desy.tine.server.devices.TDevice.getName | ( | ) |
Returns the registered device name.
String de.desy.tine.server.devices.TDevice.getRedirection | ( | ) |
Returns the redirection string associated with this device.
float de.desy.tine.server.devices.TDevice.getZposition | ( | ) |
boolean de.desy.tine.server.devices.TDevice.isMaskSet | ( | int | mask | ) |
Determines whether this device will be returned in a query containing the given mask.
mask | is the mask value to query against. |
boolean de.desy.tine.server.devices.TDevice.isOffline | ( | ) |
void de.desy.tine.server.devices.TDevice.removeAlarm | ( | int | code | ) |
Removes the alarm with the given code from the local alarm server's list.
code | Is 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 | ) |
Sets an alarm with the given code.
code | The alarm code to apply to the alarm |
Referenced by de.desy.tine.server.devices.TDevice.setAlarm().
TAlarm de.desy.tine.server.devices.TDevice.setAlarm | ( | int | code, |
byte[] | data | ||
) |
Sets an alarm with the given data set.
code | The alarm code to apply to the alarm |
data | The alarm data associated with the alarm |
References de.desy.tine.server.devices.TDevice.setAlarm().
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().
code | The alarm code to apply to the alarm |
data | The alarm data associated with the alarm |
flags | The alarm descriptor to apply to the alarm |
TAlarm de.desy.tine.server.devices.TDevice.setAlarm | ( | int | code, |
float | data | ||
) |
Sets an alarm with the given data set.
code | The alarm code to apply to the alarm |
data | The alarm data associated with the alarm |
References de.desy.tine.server.devices.TDevice.setAlarm().
TAlarm de.desy.tine.server.devices.TDevice.setAlarm | ( | int | code, |
int | data | ||
) |
Sets an alarm with the given data set.
code | The alarm code to apply to the alarm |
data | The alarm data associated with the alarm |
References de.desy.tine.server.devices.TDevice.setAlarm().
TAlarm de.desy.tine.server.devices.TDevice.setAlarm | ( | int | code, |
short[] | data | ||
) |
Sets an alarm with the given data set.
code | The alarm code to apply to the alarm |
data | The alarm data associated with the alarm |
References de.desy.tine.server.devices.TDevice.setAlarm().
TAlarm de.desy.tine.server.devices.TDevice.setAlarm | ( | int | code, |
TDataType | data | ||
) |
Sets an alarm with the given data set.
code | The alarm code to apply to the alarm |
data | The alarm data associated with the alarm |
References de.desy.tine.server.devices.TDevice.setAlarm().
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.
description | The description to be applied to this device. |
void de.desy.tine.server.devices.TDevice.setLocation | ( | String | location | ) |
Assigns a location text string to this device.
This can be a text description of the physical location of the device or a 'redirection string' of the form '<redirection' or '<$env/device'.
For example, '</SITE/Locator/131.169.151.66[Location]' will redirect a call to stock property "DEVLOCATION" to the redirection address given.
'<$TINE_LCTR/131.169.151.66' will redirect to which ever server the environment variable 'TINE_LCTR' points to plus the 'device' 131.169.151.66 and the default property 'Location'.
In this manner, a server can provide the physical location of any remote IP devices it addresses.
location | is the desired location text for this device |
void de.desy.tine.server.devices.TDevice.setMask | ( | int | mask | ) |
Assigns a device mask to this device.
This is a positive signed integer which can be used as a tag for this device. Typically this will be a single bit identifier for the category of device that this device belongs to.
This mask only plays a role in wildcard calls or in calls referencing the meta-property ".DMASK.".
mask | is the desired device mask |
void de.desy.tine.server.devices.TDevice.setName | ( | String | name | ) |
Sets the device name for this device.
name | The device name to associate with this device |
void de.desy.tine.server.devices.TDevice.setOffline | ( | boolean | offline | ) |
Set this device off-line (true) or on-line (false).
This is a purely software flag which is only relevant in wildcard calls or calls referencing the meta-property ".ONLINE".
offline | is the desired 'off line' status of the device |
void de.desy.tine.server.devices.TDevice.setPropertyList | ( | String[] | prpList | ) |
Assigns a list of registered properties to this device.
Under some circumstances not all registered properties will be supported by all registered devices. This registration call can be used to assign a specific list of (registered) properties to this devices. If a property in the assigned list is NOT found in the property registry then will have no effect.
prpList | is the list of properties to assign to 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.
redirection | The redirection string of the general form '/<context>/<server>/<device name>[property]'. In this case, ONLY the '<server>' element is relevant. |
void de.desy.tine.server.devices.TDevice.setZposition | ( | float | zpos | ) |
Assigns a Z or longitudinal position for this device.
The Z position may or may not be relevant to a given device. It essentially refers to the location of the device readout in the accelerator (e.g. along the beam path).
zpos | is the desired Z (longitudinal) position for this device. |