Equipment module factory. More...
Public Member Functions | |
int | setSystemAlias (String alias, String name) |
Sets a system alias pair. More... | |
void | setAvailableMemoryAlarmThreshold (long minAvailBytes) |
If minAvailBytes > 0 an automatic alarm will be set if the server's available free memory falls below this setting. More... | |
long | getAvailableMemoryAlarmThreshold () |
int | SetFreeBlocksAlarmThreshold (String path, long minFreeBlocks) |
Add given path to the automatic alarm generation tables for low disk space. More... | |
void | setSendSingleDelivery (boolean value) |
Sets ability to handle synchronous requests in an 'express' manner. More... | |
boolean | getSendSingleDelivery () |
Gets the current setting for the ability to handle synchronous requests in an 'express' manner. More... | |
int | registerCycleTrigger (TCycleTrigger trigger) |
Registers a cycle trigger callback dispatch function. More... | |
Static Public Member Functions | |
static void | setRequireAcknowledgments (boolean value) |
If set to 'true' requires an acknowledgment from a client if data are set out according to DATACHANGE or EVENT criteria. More... | |
static boolean | getRequireAcknowledgments () |
If set to 'true' requires an acknowledgment from a client if data are set out according to DATACHANGE or EVENT criteria. More... | |
static void | setServerWaiting (boolean value) |
A server can be toggled in and out of a waiting state with this method. More... | |
static void | setRenewalLength (short value) |
A server can explicitly set the contract subscription renewal length with this call. More... | |
static int | getPortOffset (String fecName) |
Obtains the FEC port offset appropriate for the give FEC name. More... | |
Equipment module factory.
The equipment module factory maintains a list of registered equipment modules in a running TINE server process. It manages all access and scheduling of the associated dispatch and property handlers as well as local history and alarm access.
long de.desy.tine.server.equipment.TEquipmentModuleFactory.getAvailableMemoryAlarmThreshold | ( | ) |
|
static |
Obtains the FEC port offset appropriate for the give FEC name.
In cases where the pure registration API routines are used to register FEC and server information (as opposed to a common fecid.csv configuration file) it is often a more cumbersome task to ensure a unique FEC port on the host machine. This routine can be used to this end. It will search the existing FEC manifest on the current host in order to find the matching entry for the given FEC name. If the entry is not found, then the 'next free port' is returned. In this way the FEC can always register with its own proper FEC port, without the need to hard code this number.
If this routine is called after the server is running and the FEC name is not found in the manifest the -name_unknown is returned.
fecName | is the targeted FEC name for which a port offset is to be assigned. |
example
References de.desy.tine.dataUtils.TDataTime.getDataTimeStamp().
|
static |
If set to 'true' requires an acknowledgment from a client if data are set out according to DATACHANGE or EVENT criteria.
boolean de.desy.tine.server.equipment.TEquipmentModuleFactory.getSendSingleDelivery | ( | ) |
Gets the current setting for the ability to handle synchronous requests in an 'express' manner.
If set to 'true' (default) then incoming synchronous requests are handled immediately without scanning an collating the current contract table
int de.desy.tine.server.equipment.TEquipmentModuleFactory.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'.
trigger | is a reference to the dispatch handler to be called when a new cycle number arrives. |
Example:
Referenced by de.desy.tine.server.equipment.TEquipmentModule.registerCycleTrigger().
void de.desy.tine.server.equipment.TEquipmentModuleFactory.setAvailableMemoryAlarmThreshold | ( | long | minAvailBytes | ) |
If minAvailBytes > 0 an automatic alarm will be set if the server's available free memory falls below this setting.
minAvailBytes | is the desired alarm threshold in bytes |
int de.desy.tine.server.equipment.TEquipmentModuleFactory.SetFreeBlocksAlarmThreshold | ( | String | path, |
long | minFreeBlocks | ||
) |
Add given path to the automatic alarm generation tables for low disk space.
A server can instruct the local alarm subsystem to automatically generate low disk space warnings and alarms by making use of this method.
path | is the path containing the disk drive or device mount which is to be monitored for available disk space |
minFreeBlocks | is the minimum number of free blocks (1000 byte units) which must be available. If the available disk space goes below this value a 'warn_disk_space' alarm is issued. If the available disk space goes below 10 percent of this value a 'low_disk_space' alarm is issued. |
For example:
TEquipmentModuleFactory.getInstance().SetFreeBlocksAlarmThreshold("L:/history", 50000000L);
will cause disk space alarms to occur if the drive "L:" (windows system) shows fewer than 50000000 blocks (i.e. 50000000000 bytes) available.
|
static |
A server can explicitly set the contract subscription renewal length with this call.
Subscriptions generally have a set duration length of 60 at 'normal' polling intervals, which is periodically renewed by the client. Under some circumstances (e.g. the server expects 'CM_EVENT' acquisition mode and knows that the event interval is small) the server will want to explicitly set the duration length to some larger value.
value | is the desired contact subscription renewal length |
|
static |
If set to 'true' requires an acknowledgment from a client if data are set out according to DATACHANGE or EVENT criteria.
value | is the desired setting (default = 'true') |
void de.desy.tine.server.equipment.TEquipmentModuleFactory.setSendSingleDelivery | ( | boolean | value | ) |
Sets ability to handle synchronous requests in an 'express' manner.
If set to 'true' (default) then incoming synchronous requests are handled immediately without scanning an collating the current contract table
value | is the desired setting (default = true) |
|
static |
A server can be toggled in and out of a waiting state with this method.
During initialization it might be prudent to set the waiting state to 'true' until all initialization has been completed and the server is ready to server, at which point the waiting state can then be set to 'false'.
If the server is in a waiting state, all requests will receive the error code 'not initialized' as the link status.
value | is the wait state. |
int de.desy.tine.server.equipment.TEquipmentModuleFactory.setSystemAlias | ( | String | alias, |
String | name | ||
) |
Sets a system alias pair.
An alias can be established for any registered property or device via this method call.
alias | is an alias name which can be used for the registered device or property given. |
name | is the targeted registered device or property for which an alias is desired. |