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.server.devices.TDevice Class Reference

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

Detailed Description

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

Author
duval

Constructor & Destructor Documentation

◆ TDevice() [1/3]

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

◆ TDevice() [2/3]

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

◆ TDevice() [3/3]

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

References de.desy.tine.server.equipment.TEquipmentModule.getRegisteredNetsFromFile().

Member Function Documentation

◆ clearAlarm()

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

◆ clearAlarms()

void de.desy.tine.server.devices.TDevice.clearAlarms ( )

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

◆ getDescription()

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.

◆ getLocation()

String de.desy.tine.server.devices.TDevice.getLocation ( )
Returns
the location text string assigned to this device.

◆ getMask()

int de.desy.tine.server.devices.TDevice.getMask ( )
Returns
the current device mask for this device

◆ getName()

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

Returns the registered device name.

Returns
The registered device name

◆ getRedirection()

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

Returns the redirection string associated with this device.

Returns
the redirection string associated with this device

◆ getZposition()

float de.desy.tine.server.devices.TDevice.getZposition ( )
Returns
the configured Z or longitudinal postion of this device.

◆ isMaskSet()

boolean de.desy.tine.server.devices.TDevice.isMaskSet ( int  mask)

Determines whether this device will be returned in a query containing the given mask.

Parameters
maskis the mask value to query against.
Returns

◆ isOffline()

boolean de.desy.tine.server.devices.TDevice.isOffline ( )
Returns
the current off-line status of the device

◆ removeAlarm()

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

◆ setAlarm() [1/7]

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
the Alarm instance that was set.

Referenced by de.desy.tine.server.devices.TDevice.setAlarm().

◆ setAlarm() [2/7]

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
the Alarm instance that was set.

References de.desy.tine.server.devices.TDevice.setAlarm().

◆ setAlarm() [3/7]

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
the Alarm instance that was set.

◆ setAlarm() [4/7]

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

References de.desy.tine.server.devices.TDevice.setAlarm().

◆ setAlarm() [5/7]

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
the Alarm instance that was set.

References de.desy.tine.server.devices.TDevice.setAlarm().

◆ setAlarm() [6/7]

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
the Alarm instance that was set.

References de.desy.tine.server.devices.TDevice.setAlarm().

◆ setAlarm() [7/7]

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
the Alarm instance that was set.

References de.desy.tine.server.devices.TDevice.setAlarm().

◆ setDescription()

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.

◆ setLocation()

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.

Parameters
locationis the desired location text for this device

◆ setMask()

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.

Note
a value of '0' is equivalent to ALL bits. Hence a device with mask 0 will always appear in any query.

This mask only plays a role in wildcard calls or in calls referencing the meta-property ".DMASK.".

Parameters
maskis the desired device mask

◆ setName()

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

◆ setOffline()

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".

Parameters
offlineis the desired 'off line' status of the device

◆ setPropertyList()

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.

Parameters
prpListis the list of properties to assign to this device.

◆ setRedirection()

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.

◆ setZposition()

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

Parameters
zposis the desired Z (longitudinal) position for this device.

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