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.equipment.TEquipmentModule Class Reference

A server handles all data requests through its equipment module. More...

Public Member Functions

int registerPropertySignalHandler (String property, TPropertySignalHandler handler)
 Registers a property signal handler for the given property. More...
 
int addAlarmDefinition (int code, TAlarmDefinition adef, String filter)
 Inserts an alarm definition into the alarm definition table. More...
 
int addAlarmDefinition (TAlarmDefinition adef)
 Inserts an alarm definition into the alarm definition table. More...
 
int addAlarmDefinition (TAlarmDefinition adef, String filter)
 Inserts an alarm definition into the alarm definition table. More...
 
TDevice getDevice (String devName)
 Obtains a TDevice instance for the input device name. More...
 
TDevice getDevice (int devNumber)
 Obtains a TDevice instance for the input device number. More...
 
int addAlarmWatchTableEntry (String deviceName, String propertyName, int dataSize, int dataFormat, int alarmSystem, int alarmSeverity, int alarmCode, int alarmCodeHigh, int alarmCodeLow, TAlarmWatchThreshold alarmWatchThreshold)
 
int addAlarmWatchTableEntry (String deviceName, String propertyName, int dataSize, int dataFormat, int alarmSeverity, int alarmCodeHigh, int alarmCodeLow, TAlarmWatchThreshold alarmWatchThreshold)
 
int addAlarmWatchTableEntry (String deviceName, String propertyName, int dataSize, int dataFormat, int alarmSeverity, int alarmCode, TAlarmWatchThreshold alarmWatchThreshold)
 
int addAlarmWatchTableEntry (String deviceName, String propertyName, int dataSize, int dataFormat, int alarmSeverity, TAlarmWatchThreshold alarmWatchThreshold)
 Inserts a property to be monitored into the local alarm server's Watch Table. More...
 
int addAlarmWatchTableEntry (String deviceName, String propertyName, int dataSize, int dataFormat, int alarmSeverity, TAlarmWatchThreshold alarmWatchThreshold, int alarmSystem)
 Inserts a property to be monitored into the local alarm server's Watch Table. More...
 
int addLocalHistoryRecord (int recordIndex, String device, String property, int dataSize, int dataFormat)
 Inserts a local history element into the local history server. More...
 
int addLocalHistoryRecord (int recordIndex, String device, String property, int dataSize, int dataFormat, int arrayType, THistorySpecification histSpec)
 Inserts a local history element into the local history server. More...
 
int setLocalName (String localName)
 Sets the desired local equipment module name for this equipment module. More...
 
String getLocalName ()
 
int setExportName (String exportName)
 Directly sets the export name to use for this equipment module, i.e. More...
 
String getExportName ()
 
void setGroupName (String grpName)
 Sets an optional group server name which this server should join. More...
 
String getGroupName ()
 Gets the current group server name setting. More...
 
void setGroupDevicePrefix (String prefix)
 Sets the device name prefix to use if the device server joins a group. More...
 
String getGroupDevicePrefix ()
 Gets the device name prefix to use if the device server joins a group. More...
 
void setGroupDevicePostfix (String postfix)
 Sets the device name postfix to use if the device server joins a group. More...
 
String getGroupDevicePostfix ()
 Gets the device name postfix to use if the device server joins a group. More...
 
void setGroupIndex (int metric)
 Sets the device list metric to use if the device server joins a group. More...
 
int getGroupIndex ()
 Gets the device list metric used if the device server joins a group. More...
 
int setContext (String exportContext)
 Directly sets the export context to use for this equipment module. More...
 
String getContext ()
 
int appendHistoryData (String property, String device, TDataType dout)
 Inserts local history data into the local history ring buffer. More...
 
 TEquipmentModule ()
 Principal constructor. More...
 
void setEquipmentFunction (TEquipmentFunction eqpFunction)
 Assigns an equipment function. More...
 
void registerProperty (String prpName, TDataType dout, TDataType din, short acc, TPropertyDescription prpDesc, int prpId)
 Registers a property without a handler. More...
 
void registerProperty (TExportProperty prp, TPropertyHandler handler)
 Registers a property and assigns a handler. More...
 
void removeProperty (String property)
 Removes the registered property from the equipment module's property list. More...
 
void registerDevices (Collection< String[]> deviceCollection)
 Adds a collection of device names to the module's device list.
 
void registerDevice (TDevice device)
 Adds a device to the module's device list. More...
 
void removeDevice (String devName)
 Removes a registered device from the device list. More...
 
void removeDevice (String devName, int devNumber)
 Removes a registered device from the device list. More...
 
int registerDeviceName (String devName)
 Adds a device name to the module's device list. More...
 
int registerDeviceName (String devName, int devNumber)
 Adds a device name to the module's device list. More...
 
LinkedList< String > getPropertyNames ()
 Returns all property names in a linked list. More...
 
LinkedList< String > getDeviceNames ()
 Returns all device names in a linked list. More...
 
boolean hasStockProperty (String propertyName)
 Returns true if this equipment module has registered a stock property of a given name. More...
 
short callStockProperty (String propertyName, String devName, TDataType dout, TDataType din, TAccess devAccess)
 Calls a stock property handler. More...
 
short callProperty (String propertyName, String devName, TDataType dout, TDataType din, TAccess devAccess)
 Finds a property and calls the property handler. More...
 
boolean getRegisteredUsersFromFile (LinkedList< String > usrsLst, String tag)
 
boolean getRegisteredUsersFromFile (LinkedList< String > usrsLst, LinkedList< String > grpsLst, String tag)
 
boolean getRegisteredNetsFromFile (LinkedList< String > lst, String tag)
 
void setSubsystem (String subsystem)
 Sets the subsystem to which the device server should belong. More...
 
int scheduleProperty (String devPropertyList)
 An equipment module can schedule a property or set of properties for immediate execution and delivery
More...
 
int resetMultiChannelProperty (String devPropertyList)
 Sends (schedules) a 'reset_mca_property' signal to any listening client. More...
 
int registerCycleTrigger (TCycleTrigger trigger)
 Registers a cycle trigger callback dispatch function. More...
 
void setCycleNumberKey (String key)
 Sets the trigger cycler key to the value given. More...
 
String getCycleNumberKey ()
 Gets the trigger cycler key. More...
 
int unregisterCycleTrigger (TCycleTrigger trigger)
 Unregisters a previously registered cycle trigger callback dispatch function. More...
 
void setStateChangeTrigger (TStateChangeTrigger stateChangeTrigger)
 Establishes a state-change trigger callback for this equipment module. More...
 
void setStateChangeTrigger (TStateChangeTrigger stateChangeTrigger, String stateChangeKey)
 Establishes a state-change trigger callback for this equipment module. More...
 

Detailed Description

A server handles all data requests through its equipment module.


An exported device server refers to one and only one equipment module. The equipment module will have a property list and a device list associated with it.

Author
duval

Constructor & Destructor Documentation

◆ TEquipmentModule()

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

Principal constructor.

Use this constructor in most cases. This will attempt to determine a suitable local name for the equipment module.

Member Function Documentation

◆ addAlarmDefinition() [1/3]

int de.desy.tine.server.equipment.TEquipmentModule.addAlarmDefinition ( int  code,
TAlarmDefinition  adef,
String  filter 
)

Inserts an alarm definition into the alarm definition table.

As an alternative to the <local name>-alarms.csv configuration file, the front end server can make use of this API call in order to fill in the alarm definition table describing locally generated alarms. This is particularly useful for embedded platforms where there is no file system, or where a TINE server is used as a translation layer and needs to map a given alarm system onto the TINE alarm system.

Parameters
codeis a specific alarm code to apply the alarm definition to. (Use the method without this parameter to simply apply the code registered in the TAlarmDefinition instance.)
adefis an instance of an Alarm Definition Structure (ADS) containing the alarm table information which is to be appended to the alarm definition table
Returns
0 or a TINE error code.

Referenced by de.desy.tine.server.equipment.TEquipmentModule.addAlarmDefinition(), and de.desy.tine.server.equipment.TEquipmentModule.addAlarmWatchTableEntry().

◆ addAlarmDefinition() [2/3]

int de.desy.tine.server.equipment.TEquipmentModule.addAlarmDefinition ( TAlarmDefinition  adef)

Inserts an alarm definition into the alarm definition table.

As an alternative to the <local name>-alarms.csv configuration file, the front end server can make use of this API call in order to fill in the alarm definition table describing locally generated alarms. This is particularly useful for embedded platforms where there is no file system, or where a TINE server is used as a translation layer and needs to map a given alarm system onto the TINE alarm system.

Parameters
adefis an instance of an Alarm Definition Structure (ADS) containing the alarm table information which is to be appended to the alarm definition table
Returns
0 or a TINE error code.

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

◆ addAlarmDefinition() [3/3]

int de.desy.tine.server.equipment.TEquipmentModule.addAlarmDefinition ( TAlarmDefinition  adef,
String  filter 
)

Inserts an alarm definition into the alarm definition table.

As an alternative to the <local name>-alarms.csv configuration file, the front end server can make use of this API call in order to fill in the alarm definition table describing locally generated alarms. This is particularly useful for embedded platforms where there is no file system, or where a TINE server is used as a translation layer and needs to map a given alarm system onto the TINE alarm system.

Parameters
adefis an instance of an Alarm Definition Structure (ADS) containing the alarm table information which is to be appended to the alarm definition table
filteris a parsable filter string defining the filter condition.
Returns
0 or a TINE error code.

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

◆ addAlarmWatchTableEntry() [1/5]

int de.desy.tine.server.equipment.TEquipmentModule.addAlarmWatchTableEntry ( String  deviceName,
String  propertyName,
int  dataSize,
int  dataFormat,
int  alarmSeverity,
int  alarmCode,
TAlarmWatchThreshold  alarmWatchThreshold 
)
Deprecated:
the TAlarmWatchThreshold class now holds all code and tag information

Certain alarms are to be set whenever the value of a property exceeds a definable threshold. Such alarms can be managed automatically by the local alarm server if the alarm criteria are entered into the alarm watch table. This can be achieved by calling this routine (or supplying a startup configuration file almwatch.csv).

Parameters
deviceNameis the device name associated with the property to be called by the local alarm server.
propertyNameis the property which is to be called by the local alarm server.
dataSizeis the data array size to be called by the local alarm server.
dataFormatis the TINE data format to be called by the local alarm server
alarmSeverityis the severity of the alarm issued when the data returned by the call exceed the given thresholds.
alarmCodeis the designated alarm code to apply to any alarm condition. Pass a '0' to distinguish between the alarmCodeHigh and alarmCodeLow conditions (next 2 parameters).
alarmWatchThresholdis an instance of a TAlarmWatchThreshold which defines the threshold conditions for applying an alarm.
Returns
0 or an TINE error code (e.g. TErrorList.illegal_property).

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

◆ addAlarmWatchTableEntry() [2/5]

int de.desy.tine.server.equipment.TEquipmentModule.addAlarmWatchTableEntry ( String  deviceName,
String  propertyName,
int  dataSize,
int  dataFormat,
int  alarmSeverity,
int  alarmCodeHigh,
int  alarmCodeLow,
TAlarmWatchThreshold  alarmWatchThreshold 
)
Deprecated:
the TAlarmWatchThreshold class now holds all code and tag information

Certain alarms are to be set whenever the value of a property exceeds a definable threshold. Such alarms can be managed automatically by the local alarm server if the alarm criteria are entered into the alarm watch table. This can be achieved by calling this routine (or supplying a startup configuration file almwatch.csv).

Parameters
deviceNameis the device name associated with the property to be called by the local alarm server.
propertyNameis the property which is to be called by the local alarm server.
dataSizeis the data array size to be called by the local alarm server.
dataFormatis the TINE data format to be called by the local alarm server
alarmSeverityis the severity of the alarm issued when the data returned by the call exceed the given thresholds.
alarmCodeHighis the alarm code to apply when the high threshold value is exceeded by the readback data. If alarmCodeHigh is '0', then the code TErrorList.value_too_high (or TErrorList.warn_too_high) is applied.
alarmCodeLowis the alarm code to apply when the low threshold value is exceeded by the readback data. If alarmCodeLow is '0', then the code TErrorList.value_too_low (or TErrorList.warn_too_low) is applied.
alarmWatchThresholdis an intance of a TAlarmWatchThreshold which defines the threshold conditions for applying an alarm.
Returns
0 or an TINE error code (e.g. TErrorList.illegal_property).

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

◆ addAlarmWatchTableEntry() [3/5]

int de.desy.tine.server.equipment.TEquipmentModule.addAlarmWatchTableEntry ( String  deviceName,
String  propertyName,
int  dataSize,
int  dataFormat,
int  alarmSeverity,
TAlarmWatchThreshold  alarmWatchThreshold 
)

Inserts a property to be monitored into the local alarm server's Watch Table.

Certain alarms are to be set whenever the value of a property exceeds a definable threshold. Such alarms can be managed automatically by the local alarm server if the alarm criteria are entered into the alarm watch table. This can be achieved by calling this routine (or supplying a startup configuration file almwatch.csv).

Parameters
deviceNameis the device name associated with the property to be called by the local alarm server.
propertyNameis the property which is to be called by the local alarm server.
dataSizeis the data array size to be called by the local alarm server.
dataFormatis the TINE data format to be called by the local alarm server
alarmSeverityis the severity of the alarm issued when the data returned by the call exceed the given thresholds.
alarmWatchThresholdis an instance of a TAlarmWatchThreshold which defines the threshold conditions for applying an alarm.
Returns
0 or an TINE error code (e.g. TErrorList.illegal_property).

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

◆ addAlarmWatchTableEntry() [4/5]

int de.desy.tine.server.equipment.TEquipmentModule.addAlarmWatchTableEntry ( String  deviceName,
String  propertyName,
int  dataSize,
int  dataFormat,
int  alarmSeverity,
TAlarmWatchThreshold  alarmWatchThreshold,
int  alarmSystem 
)

Inserts a property to be monitored into the local alarm server's Watch Table.

Certain alarms are to be set whenever the value of a property exceeds a definable threshold. Such alarms can be managed automatically by the local alarm server if the alarm criteria are entered into the alarm watch table. This can be achieved by calling this routine (or supplying a startup configuration file almwatch.csv).

Parameters
deviceNameis the device name associated with the property to be called by the local alarm server.
propertyNameis the property which is to be called by the local alarm server.
dataSizeis the data array size to be called by the local alarm server.
dataFormatis the TINE data format to be called by the local alarm server
alarmSeverityis the severity of the alarm issued when the data returned by the call exceed the given thresholds.
alarmWatchThresholdis an instance of a TAlarmWatchThreshold which defines the threshold conditions for applying an alarm.
alarmSystemis the alarm system identifier to be associated with the alarm. The value of '0' signals the Central Alarm Server to apply the designated alarm system code for the server in question.
Returns
0 or an TINE error code (e.g. TErrorList.illegal_property).

References de.desy.tine.server.equipment.TEquipmentModule.addAlarmDefinition(), de.desy.tine.server.properties.TPropertyDescription.getArrayType(), and de.desy.tine.server.properties.TExportProperty.getDescription().

◆ addAlarmWatchTableEntry() [5/5]

int de.desy.tine.server.equipment.TEquipmentModule.addAlarmWatchTableEntry ( String  deviceName,
String  propertyName,
int  dataSize,
int  dataFormat,
int  alarmSystem,
int  alarmSeverity,
int  alarmCode,
int  alarmCodeHigh,
int  alarmCodeLow,
TAlarmWatchThreshold  alarmWatchThreshold 
)
Deprecated:
the TAlarmWatchThreshold class now holds all code and tag information

Certain alarms are to be set whenever the value of a property exceeds a definable threshold. Such alarms can be managed automatically by the local alarm server if the alarm criteria are entered into the alarm watch table. This can be achieved by calling this routine (or supplying a startup configuration file almwatch.csv).

Parameters
deviceNameis the device name associated with the property to be called by the local alarm server.
propertyNameis the property which is to be called by the local alarm server.
dataSizeis the data array size to be called by the local alarm server.
dataFormatis the TINE data format to be called by the local alarm server
alarmSystemis the alarm system identifier to be associated with the alarm. The value of '0' signals the Central Alarm Server to apply the designated alarm system code for the server in question.
alarmSeverityis the severity of the alarm issued when the data returned by the call exceed the given thresholds.
alarmCodeis the designated alarm code to apply to any alarm condition. Pass a '0' to distinguish between the alarmCodeHigh and alarmCodeLow conditions (next 2 parameters).
alarmCodeHighis the alarm code to apply when the high threshold value is exceeded by the readback data. (parameter alarmCode must be '0'). If both alarmCode and alarmCodeHigh are '0', then the code TErrorList.value_too_high (or TErrorList.warn_too_high) is applied.
alarmCodeLowis the alarm code to apply when the low threshold value is exceeded by the readback data. (parameter alarmCode must be '0'). If both alarmCode and alarmCodeLow are '0', then the code TErrorList.value_too_low (or TErrorList.warn_too_low) is applied.
alarmWatchThresholdis an intance of a TAlarmWatchThreshold which defines the threshold conditions for applying an alarm.
Returns
0 or an TINE error code (e.g. TErrorList.illegal_property).

Referenced by de.desy.tine.server.equipment.TEquipmentModule.addAlarmWatchTableEntry().

◆ addLocalHistoryRecord() [1/2]

int de.desy.tine.server.equipment.TEquipmentModule.addLocalHistoryRecord ( int  recordIndex,
String  device,
String  property,
int  dataSize,
int  dataFormat 
)

Inserts a local history element into the local history server.

A server can instruct the local history server to keep a history of the given property by utilizing this call. The local history server will periodically call the property as specified according to the following input parameters.

Parameters
recordIndexis the local history index to be identified with this local history element (Note: this must be unique with this server process and within the history data repository).
deviceis the device name to be associated with the property name supplied as the second parameter.
propertyis the requested property for which a history is to be kept
dataSizeis the length of the local history call.
dataFormatis the TINE format of the local history call.
Note
This call will use the default history acquisition specifications of 1 Hz polling and archive intervals, 5 minutes short term and 1 month long term depths, 30 minutes archive heartbeat and 10 percent tolerance.
Returns

References de.desy.tine.server.properties.TPropertyDescription.getArrayType(), and de.desy.tine.server.properties.TExportProperty.getDescription().

Referenced by de.desy.tine.server.equipment.TEquipmentModule.registerProperty().

◆ addLocalHistoryRecord() [2/2]

int de.desy.tine.server.equipment.TEquipmentModule.addLocalHistoryRecord ( int  recordIndex,
String  device,
String  property,
int  dataSize,
int  dataFormat,
int  arrayType,
THistorySpecification  histSpec 
)

Inserts a local history element into the local history server.

A server can instruct the local history server to keep a history of the given property by utilizing this call. The local history server will periodically call the property as specified according to the following input parameters.

Parameters
recordIndexis the local history index to be identified with this local history element (Note: this must be unique with this server process and within the history data repository).
deviceis the device name to be associated with the property name supplied as the second parameter.
propertyis the requested property for which a history is to be kept
dataSizeis the length of the local history call.
dataFormatis the TINE format of the local history call.
arrayTypeis the input property's array type. Passing a value of '0' (AT_UNKNOWN) will instruct the subsystem to determine the property's array type from the property registry.
histSpecis an instance of t THistorySpecification object which instructs the local history subsystem how to maintain the local history information (e.g. short and long term storage depths, filtering conditions, polling and archive intervals).
Returns

References de.desy.tine.server.properties.TPropertyDescription.getArrayType(), de.desy.tine.server.properties.TExportProperty.getDescription(), and de.desy.tine.server.equipment.TEquipmentModule.getLocalName().

◆ appendHistoryData()

int de.desy.tine.server.equipment.TEquipmentModule.appendHistoryData ( String  property,
String  device,
TDataType  dout 
)

Inserts local history data into the local history ring buffer.

A server can insert data into the local history ring buffer directly with this call. The inserted data behave in exactly the same manner as if added via a call the the designated equipment module from the local history subsystem.

The information provided in the call MUST correspond to a registered local history element or the call will fail. The server developer can ensure that history data are inserted ONLY via this call (and not via the local history subsystem) by trapping the CA_HIST big in the access flag within the equipment module dispatch and returning an error condition such as 'not_implemented'.

Parameters
propertyis the requested property for which a history record is being kept.
deviceis the device name for which a history record is being kept.
doutis aTDataType object specifying the array length, data format, and timestamp and other data stamps of the history record along with the accompanying data.
Returns
0 upon success.

References de.desy.tine.dataUtils.TDataType.getTimeStamp().

◆ callProperty()

short de.desy.tine.server.equipment.TEquipmentModule.callProperty ( String  propertyName,
String  devName,
TDataType  dout,
TDataType  din,
TAccess  devAccess 
)

Finds a property and calls the property handler.

If no property handler is installed, the equipment function is called instead.

Parameters
propertyName
devName
dout
din
devAccess
Returns
Return code of property handler/equipment function. TErrorList.non_existent_elem if no property handler and no equipment function could be found.

References de.desy.tine.server.equipment.TEquipmentModule.getLocalName(), and de.desy.tine.definitions.TAccess.toShort().

◆ callStockProperty()

short de.desy.tine.server.equipment.TEquipmentModule.callStockProperty ( String  propertyName,
String  devName,
TDataType  dout,
TDataType  din,
TAccess  devAccess 
)

Calls a stock property handler.

Parameters
propertyName
devName
dout
din
devAccess
Returns

◆ getContext()

String de.desy.tine.server.equipment.TEquipmentModule.getContext ( )
Returns
the current setting for the export context.

◆ getCycleNumberKey()

String de.desy.tine.server.equipment.TEquipmentModule.getCycleNumberKey ( )

Gets the trigger cycler key.

By default a CYCLER is a server called "CYCLER" in the same context as the initializing device server and produces a keyword (property) called "CycleNumber". This gives rise to the Cycle Key: "/\<context\>/CYCLER/CycleNumber". This default value can also be set via the environment (set TINE_CYCLE_KEY) or via API.

Returns
the current setting of the cycler trigger key.
See also
setCycleNumberKey, registerCycleTrigger

◆ getDevice() [1/2]

TDevice de.desy.tine.server.equipment.TEquipmentModule.getDevice ( int  devNumber)

Obtains a TDevice instance for the input device number.

Parameters
devNumberis the device number for which the TDevice instance is desired
Returns
a TDevice Instance or null

◆ getDevice() [2/2]

TDevice de.desy.tine.server.equipment.TEquipmentModule.getDevice ( String  devName)

Obtains a TDevice instance for the input device name.

Parameters
devNameis the device name for which the TDevice instance is desired
Returns
a TDevice Instance or null

◆ getDeviceNames()

LinkedList<String> de.desy.tine.server.equipment.TEquipmentModule.getDeviceNames ( )

Returns all device names in a linked list.

Returns

◆ getExportName()

String de.desy.tine.server.equipment.TEquipmentModule.getExportName ( )
Returns
the current setting for the server's export name.

◆ getGroupDevicePostfix()

String de.desy.tine.server.equipment.TEquipmentModule.getGroupDevicePostfix ( )

Gets the device name postfix to use if the device server joins a group.

Returns
the current setting of the device name postfix.
See also
setGroupName

◆ getGroupDevicePrefix()

String de.desy.tine.server.equipment.TEquipmentModule.getGroupDevicePrefix ( )

Gets the device name prefix to use if the device server joins a group.

Returns
the current setting of the device name prefix.
See also
setGroupName

◆ getGroupIndex()

int de.desy.tine.server.equipment.TEquipmentModule.getGroupIndex ( )

Gets the device list metric used if the device server joins a group.

Returns
the current setting of this value.

◆ getGroupName()

String de.desy.tine.server.equipment.TEquipmentModule.getGroupName ( )

Gets the current group server name setting.

A device server exported under a particular name represents a physical device server managing its devices and properties itself (unless explicitly redirecting). A device server can also join a 'group server' by calling setGroupName() at initialization. The group server will be created at the GENS if it does not already exist and the device server will become a member of the group.

Returns
the name of the group server with this device server will or has joined. A null or empty value (true in most cases) indicates that the server is not a member of a group server.

◆ getLocalName()

String de.desy.tine.server.equipment.TEquipmentModule.getLocalName ( )

◆ getPropertyNames()

LinkedList<String> de.desy.tine.server.equipment.TEquipmentModule.getPropertyNames ( )

Returns all property names in a linked list.

Returns

◆ getRegisteredNetsFromFile()

boolean de.desy.tine.server.equipment.TEquipmentModule.getRegisteredNetsFromFile ( LinkedList< String >  lst,
String  tag 
)
Deprecated:
Parameters
lst
tag
Returns

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

◆ getRegisteredUsersFromFile() [1/2]

boolean de.desy.tine.server.equipment.TEquipmentModule.getRegisteredUsersFromFile ( LinkedList< String >  usrsLst,
LinkedList< String >  grpsLst,
String  tag 
)
Deprecated:
Parameters
usrsLst
grpsLst
tag
Returns

◆ getRegisteredUsersFromFile() [2/2]

boolean de.desy.tine.server.equipment.TEquipmentModule.getRegisteredUsersFromFile ( LinkedList< String >  usrsLst,
String  tag 
)
Deprecated:
Parameters
usrsLst
tag
Returns

◆ hasStockProperty()

boolean de.desy.tine.server.equipment.TEquipmentModule.hasStockProperty ( String  propertyName)

Returns true if this equipment module has registered a stock property of a given name.

Parameters
propertyName
Returns

◆ registerCycleTrigger()

int de.desy.tine.server.equipment.TEquipmentModule.registerCycleTrigger ( TCycleTrigger  trigger)

Registers a cycle trigger callback dispatch function.

If a CYCLER is running in a server's context, then the server will receive 'Cycle Number' events scheduled by the designated CYCLER server. The cycle number will make use of the 'System Data Stamp' to tag all data sets obtained from the server. A server can also register a trigger function dispatch routine (or routines) to be called when a 'Cycle Number' event occurs. The dispatch routines will be called prior to setting the 'System Stamp' to the new Cycle Number, which will be set following the execution of all dispatch routines. Optionally, the server can provide a property (or list of properties) to be scheduled following the dispatch execution. This will ensure that such properties will be called immediately following dispatch execution AND contain the most recent Cycle Number as the 'System Data Stamp'.

Parameters
triggeris a reference to the dispatch handler to be called when a new cycle number arrives.
Returns
0 upon success or TErrorList.already_assigned

Example:

class MyCycleTrigger implements TCycleTrigger
{
long ts = 0;
public void update(int cycleNumber, int status)
{
long tts = System.currentTimeMillis();
if (ts == tts)
{ // 2 updates within the same millisecond ? (are there 2 CYCLERs?)
return;
}
ts = tts;
DbgLog.log("update","received cycle number : "+cycleNumber+" <"+status+">");
// do something useful? (maybe hardware IO)
}
}
private void initializeDeviceServer()
{
sineEqpModule = new SineEquipmentModule("SINEQM",(SineDevice[])sineDeviceSet.toArray(new SineDevice[0]));
sineEqpModule.registerCycleTrigger(new MyCycleTrigger());
// can alternatively be registered directly with the equipment module factory (e.g.):
// TEquipmentModuleFactory.getInstance().registerCycleTrigger(new MyCycleTrigger());
// Other iniatialization stuff omitted ...
// ...
}

References de.desy.tine.server.equipment.TEquipmentModuleFactory.registerCycleTrigger().

◆ registerDevice()

void de.desy.tine.server.equipment.TEquipmentModule.registerDevice ( TDevice  device)

Adds a device to the module's device list.

Parameters
deviceis the TDevice instance to register

◆ registerDeviceName() [1/2]

int de.desy.tine.server.equipment.TEquipmentModule.registerDeviceName ( String  devName)

Adds a device name to the module's device list.

This method also creates a TDevice instance for the device name in question, which can be retrieved via a call to getDevice().

Parameters
devNameis the device name to be assigned
Returns
the assigned device number

◆ registerDeviceName() [2/2]

int de.desy.tine.server.equipment.TEquipmentModule.registerDeviceName ( String  devName,
int  devNumber 
)

Adds a device name to the module's device list.

This method also creates a TDevice instance for the device name in question, which can be retrieved via a call to getDevice().

Parameters
devNameis the device name to be assigned
devNumberis the assigned device number
Returns
the assigned device number which was input

◆ registerProperty() [1/2]

void de.desy.tine.server.equipment.TEquipmentModule.registerProperty ( String  prpName,
TDataType  dout,
TDataType  din,
short  acc,
TPropertyDescription  prpDesc,
int  prpId 
)

Registers a property without a handler.

This property has to be handled by the equipment function.

Parameters
prpNameis the property name
doutProvides output format specification
dinProvides input format specification
accAccess information
prpDescProperty description, parsed into a string description of the property as well as range values and units.
prpIdan assigned Property ID
Returns

References de.desy.tine.server.equipment.TEquipmentModule.addLocalHistoryRecord(), de.desy.tine.server.properties.TPropertyDescription.getArrayRowLength(), de.desy.tine.definitions.TErrorList.getErrorString(), de.desy.tine.server.properties.TExportProperty.getOutputFormat(), de.desy.tine.server.properties.TExportProperty.getOutputSize(), de.desy.tine.server.properties.TPropertyDescription.setArrayRowLength(), de.desy.tine.server.properties.TPropertyDescription.setArrayType(), and de.desy.tine.server.properties.TExportProperty.setDescription().

◆ registerProperty() [2/2]

void de.desy.tine.server.equipment.TEquipmentModule.registerProperty ( TExportProperty  prp,
TPropertyHandler  handler 
)

◆ registerPropertySignalHandler()

int de.desy.tine.server.equipment.TEquipmentModule.registerPropertySignalHandler ( String  property,
TPropertySignalHandler  handler 
)

Registers a property signal handler for the given property.

Passing a 'null' handler will remove any property signal handler which might be associated with the property in question.

Parameters
propertyis the designated property for which signals are to be raised.
handleris the property signal handler function which should be called when the property in question is being accessed.
Returns
0 upon success or a TINE error code.

◆ removeDevice() [1/2]

void de.desy.tine.server.equipment.TEquipmentModule.removeDevice ( String  devName)

Removes a registered device from the device list.

If the input device does not exist, then nothing happens.

Parameters
devNameis the name of the device to be removed.

◆ removeDevice() [2/2]

void de.desy.tine.server.equipment.TEquipmentModule.removeDevice ( String  devName,
int  devNumber 
)

Removes a registered device from the device list.

If the input device does not exist, then nothing happens.

Parameters
devNameis the name of the device to be removed.
devNumberis the associated device number.

◆ removeProperty()

void de.desy.tine.server.equipment.TEquipmentModule.removeProperty ( String  property)

Removes the registered property from the equipment module's property list.

Parameters
propertyis the targeted property to remove.

◆ resetMultiChannelProperty()

int de.desy.tine.server.equipment.TEquipmentModule.resetMultiChannelProperty ( String  devPropertyList)

Sends (schedules) a 'reset_mca_property' signal to any listening client.

A server with registered multi-channel array properties can inform any attached clients that the mutli-channel array configuration has changed (e.g. array elements have been added, removed, or otherwise edited) by using this call. Any listening clients with multi-channel array links will then return to the original client startup conditions and 're-learn' the new array indexing now in place.

Parameters
devPropertyListis (comma separated) list of properties which are to be reset at the client side.
Note
This routine will call scheduleProperty() to assure immediate notification at the client side.
Returns
0 upon success, otherwise a TINE return code.

◆ scheduleProperty()

int de.desy.tine.server.equipment.TEquipmentModule.scheduleProperty ( String  devPropertyList)

An equipment module can schedule a property or set of properties for immediate execution and delivery

Parameters
devPropertyListA single string argument containing one or more properties to be scheduled for immediate execution. This should be a single string. If more than one property is to be scheduled, then the property list string should be a set of properties separated by commas or blanks
Author
duval

◆ setContext()

int de.desy.tine.server.equipment.TEquipmentModule.setContext ( String  exportContext)

Directly sets the export context to use for this equipment module.

Parameters
exportContextis the desired export context. This must be set prior to initializing the server with systemInit() from TEquipmentModuleFactory or prior to adding the equipment module to the Factory in case it has already been initialized. Such parameters may also be established via a configuration database.
Returns
0 upon success.

◆ setCycleNumberKey()

void de.desy.tine.server.equipment.TEquipmentModule.setCycleNumberKey ( String  key)

Sets the trigger cycler key to the value given.

By default a CYCLER is a server called "CYCLER" in the same context as the initializing device server and produces a keyword (property) called "CycleNumber". This gives rise to the Cycle Key: "/\<context\>/CYCLER/CycleNumber". If it is known a priori, that the CYCLER exists in another context or uses another server name or property name, the cycle key can be set via this API call or via environment (set TINE_CYCLE_KEY=<key>).

Parameters
keyis the desired CYCLER trigger key
See also
registerCycleTrigger

◆ setEquipmentFunction()

void de.desy.tine.server.equipment.TEquipmentModule.setEquipmentFunction ( TEquipmentFunction  eqpFunction)

Assigns an equipment function.

Parameters
eqpFunction

◆ setExportName()

int de.desy.tine.server.equipment.TEquipmentModule.setExportName ( String  exportName)

Directly sets the export name to use for this equipment module, i.e.

the 'device server' name.

Parameters
exportNameis the desired export name. This must be set prior to initializing the server with systemInit() from TEquipmentModuleFactory or prior to adding the equipment module to the Factory in case it has already been initialized. Also the current setting must be a null string, otherwise it will not be accepted. Such parameters may also be established via a configuration database.
Returns
0 upon success.

◆ setGroupDevicePostfix()

void de.desy.tine.server.equipment.TEquipmentModule.setGroupDevicePostfix ( String  postfix)

Sets the device name postfix to use if the device server joins a group.

Parameters
postfixis the desired device name postfix.
See also
setGroupName

◆ setGroupDevicePrefix()

void de.desy.tine.server.equipment.TEquipmentModule.setGroupDevicePrefix ( String  prefix)

Sets the device name prefix to use if the device server joins a group.

Parameters
prefixis the desired device name prefix.
See also
setGroupName

◆ setGroupIndex()

void de.desy.tine.server.equipment.TEquipmentModule.setGroupIndex ( int  metric)

Sets the device list metric to use if the device server joins a group.

Parameters
metricis the desired device group metric. This determines the order of the device server devices in the group server's device list. (default = 0). Group members with the same metric will have their devices listed in the order they were originally received by the group server.
See also
setGroupName

◆ setGroupName()

void de.desy.tine.server.equipment.TEquipmentModule.setGroupName ( String  grpName)

Sets an optional group server name which this server should join.

A device server exported under a particular name represents a physical device server managing its devices and properties itself (unless explicitly redirecting). A device server can also join a 'group server' by calling this routine at initialization. The group server will be created at the GENS if it does not already exist and the device server will become a member of the group. The metric order of the device server's devices can be set by calling setGroupIndex(). The device names can also be pre-pended or post-pended with specific tags (if necessary) by calling setGroupDevicePrefix() or setGroupDevicePostfix().

Parameters
grpNameis the name of the group server to join. A null or empty value (true in most cases) indicates that the server is not to be a member of a group server.

◆ setLocalName()

int de.desy.tine.server.equipment.TEquipmentModule.setLocalName ( String  localName)

Sets the desired local equipment module name for this equipment module.

This name is not directly visible to client-side API calls outside the server process, although it will show up in log files and in address information. Client API calls make use of the 'exported' device server name. It largely serves as an internal reference name and is currently restricted to 6 characters. This must be set prior to initializing the server with systemInit() from TEquipmentModuleFactory or prior to adding the equipment module to the Factory in case it has already been initialized. *

Parameters
localNameis the desired local equipment module name.
Returns
0 upon success.
See also
setExportName().

◆ setStateChangeTrigger() [1/2]

void de.desy.tine.server.equipment.TEquipmentModule.setStateChangeTrigger ( TStateChangeTrigger  stateChangeTrigger)

Establishes a state-change trigger callback for this equipment module.

If a GLOBLAS server is running and providing state information, then any detected state change will be passed to the callback function provided. The callback must implement the TStateChangeTrigger class. It will receive both the current state and previous state (as Strings).

Parameters
stateChangeTriggeris a reference to the callback instance.

◆ setStateChangeTrigger() [2/2]

void de.desy.tine.server.equipment.TEquipmentModule.setStateChangeTrigger ( TStateChangeTrigger  stateChangeTrigger,
String  stateChangeKey 
)

Establishes a state-change trigger callback for this equipment module.

If a GLOBLAS server is running and providing state information, then any detected state change will be passed to the callback function provided. The callback must implement the TStateChangeTrigger class. It will receive both the current state and previous state (as Strings).

Parameters
stateChangeTriggeris a reference to the callback instance.
stateChangeKeyis the GLOBALS keyword providing the declared state for the context associated with this equipment module. If 'null' then the default keyword "DeclaredState" is assumed.

◆ setSubsystem()

void de.desy.tine.server.equipment.TEquipmentModule.setSubsystem ( String  subsystem)

Sets the subsystem to which the device server should belong.

Parameters
subsystemis the desired subsystem.

◆ unregisterCycleTrigger()

int de.desy.tine.server.equipment.TEquipmentModule.unregisterCycleTrigger ( TCycleTrigger  trigger)

Unregisters a previously registered cycle trigger callback dispatch function.

If a cycle trigger event dispatch routine is no longer required, it can be unregistered using this routine.

Parameters
triggeris a reference to the dispatch handler to be removed
Returns
0 upon success or return TErrorList.un_allocated

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