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
Static Public Member Functions | List of all members
de.desy.tine.addrUtils.ENSTools Class Reference

Utility routines for accessing information from the Equipment Name Server (ENS). More...

Static Public Member Functions

static int flushNonRespondingServers (String context)
 Signals the ENS to ping all registered servers in the context given and remove from the database those which do not respond. More...
 
static int setAllowedDownTime (int downTime)
 Sets the allowed server down time at the ENS. More...
 
static int getAllowedDownTime ()
 Gets the allowed server down time from the ENS. More...
 
static int getAllowedDeviceSubsystems (String[] subsystems, String[] descriptions) throws IOException
 Provides a list of the available allowed subsystems at the ENS and an associated list of subsystem descriptions (depending on input). More...
 
static int sendExportInformationToENS (SrvAddr da, FECInfo info)
 Sends the information to the ENS as if a booting FEC is issuing a plug-and-play registration. More...
 
static int removeFECFromENS (String fecName)
 Removes the given FEC from the ENS database. More...
 
static NAME16I getSuggestedFECName (String context, String server)
 Obtains a unique FEC name applicable to the context and server names given. More...
 
static int removeDeviceServerFromENS (String context, String deviceServer)
 Removes the given device server from the ENS database. More...
 
static String[] getGroupsFromGENS (String context)
 Retrieves the registered device server groups from the Group ENS. More...
 
static String[] getGroupMembersFromGENS (String context, String group)
 Retrieves the registered device server groups from the Group ENS. More...
 
static int removeDeviceServerFromGroup (String context, String deviceServer, String group)
 Removes the given device server from the specified device group. More...
 
static int addDeviceServerToGroup (String context, String deviceServer, String group, String subSystem, int groupIndex)
 Adds a device server group member to the group specified. More...
 
static int addDeviceServerToGroup (String context, String deviceServer, String group, String subSystem, int groupIndex, String groupDevicePrefix, String groupDevicePostfix)
 Adds a device server group member to the group specified. More...
 
static void toggleENS ()
 Switch to the 'next configured' Equipment Name Server.
 
static String getCurrentENSAddress ()
 Gets the current configured ENS IP address as a string. More...
 
static String getCurrentENS ()
 Gets the current configured ENS server name. More...
 

Detailed Description

Utility routines for accessing information from the Equipment Name Server (ENS).

Author
duval

Member Function Documentation

◆ addDeviceServerToGroup() [1/2]

static int de.desy.tine.addrUtils.ENSTools.addDeviceServerToGroup ( String  context,
String  deviceServer,
String  group,
String  subSystem,
int  groupIndex 
)
static

Adds a device server group member to the group specified.

This routine can be used by an ENS administrator to add device servers to a given group as if a booting server had itself issued a plug-and-play request.

Parameters
contextis the context of the device group
deviceServeris the device server to add to the group
groupis the device group
subSystemis the subsystem to which the group should belong (relevant if the given device group is new).
groupIndexis a 'metric' which is used by the group server to establish the device order presented by the group server (smaller group indices come first).
Returns
0 upon success or a TINE error code

◆ addDeviceServerToGroup() [2/2]

static int de.desy.tine.addrUtils.ENSTools.addDeviceServerToGroup ( String  context,
String  deviceServer,
String  group,
String  subSystem,
int  groupIndex,
String  groupDevicePrefix,
String  groupDevicePostfix 
)
static

Adds a device server group member to the group specified.

This routine can be used by an ENS administrator to add device servers to a given group as if a booting server had itself issued a plug-and-play request.

Parameters
contextis the context of the device group
deviceServeris the device server to add to the group
groupis the device group
subSystemis the subsystem to which the group should belong (relevant if the given device group is new).
groupIndexis a 'metric' which is used by the group server to establish the device order presented by the group server (smaller group indices come first).
groupDevicePrefixis a prefix identifier to be applied to the device list associated with the deviceServer given. Pass a 'null' or empty entry if no prefix is desired.
groupDevicePostfixis a postfix identifier to be applied to the device list associated with the deviceServer given. Pass a 'null' or empty entry if no postfix is desired.
Returns
0 upon success or a TINE error code

References de.desy.tine.client.TLink.close(), and de.desy.tine.client.TLink.execute().

◆ flushNonRespondingServers()

static int de.desy.tine.addrUtils.ENSTools.flushNonRespondingServers ( String  context)
static

Signals the ENS to ping all registered servers in the context given and remove from the database those which do not respond.

Parameters
contextis the context for which the flush activity should take place
Returns
0 upon success or a TINE return code

References de.desy.tine.client.TLink.close(), and de.desy.tine.client.TLink.execute().

◆ getAllowedDeviceSubsystems()

static int de.desy.tine.addrUtils.ENSTools.getAllowedDeviceSubsystems ( String[]  subsystems,
String[]  descriptions 
) throws IOException
static

Provides a list of the available allowed subsystems at the ENS and an associated list of subsystem descriptions (depending on input).

Parameters
subsystemsinput/output supplies a reference to a string array which is to hold the list of allowed subsystems upon successful completion. If this array is not dimensioned large enough to contain the available list, the list will be truncated.
descriptionsinput/output supplies a reference to a string array which is to hold the list of subsystem descriptions upon successful completion. If a null is passed, then no descriptions are returned.
Returns
the total number of available subsystems (independent of the dimensions of the input subsystems array.
Exceptions
IOException,TineRuntimeErrorException

References de.desy.tine.client.TLink.executeAndClose(), and de.desy.tine.dataUtils.TDataType.getCompletionLength().

◆ getAllowedDownTime()

static int de.desy.tine.addrUtils.ENSTools.getAllowedDownTime ( )
static

Gets the allowed server down time from the ENS.

This applies to ALL servers in the ENS database and constitutes a maximum duration a server is allowed to be down before being removed from the database

Returns
the allowed down time in seconds if successful or a negative TINE return code upon error

References de.desy.tine.client.TLink.executeAndClose().

◆ getCurrentENS()

static String de.desy.tine.addrUtils.ENSTools.getCurrentENS ( )
static

Gets the current configured ENS server name.

Returns
the current configured ENS server name

◆ getCurrentENSAddress()

static String de.desy.tine.addrUtils.ENSTools.getCurrentENSAddress ( )
static

Gets the current configured ENS IP address as a string.

Returns
the current configured ENS address

◆ getGroupMembersFromGENS()

static String [] de.desy.tine.addrUtils.ENSTools.getGroupMembersFromGENS ( String  context,
String  group 
)
static

Retrieves the registered device server groups from the Group ENS.

Parameters
contextis the context of the device group
groupis the device group
Returns
a list of the registered group members for the given device group

References de.desy.tine.client.TLink.executeAndClose(), and de.desy.tine.dataUtils.TDataType.getCompletionLength().

◆ getGroupsFromGENS()

static String [] de.desy.tine.addrUtils.ENSTools.getGroupsFromGENS ( String  context)
static

Retrieves the registered device server groups from the Group ENS.

Parameters
contextis the context whose groups are desired
Returns
a list of registered device groups

References de.desy.tine.client.TLink.close(), de.desy.tine.client.TLink.execute(), and de.desy.tine.dataUtils.TDataType.getCompletionLength().

◆ getSuggestedFECName()

static NAME16I de.desy.tine.addrUtils.ENSTools.getSuggestedFECName ( String  context,
String  server 
)
static

Obtains a unique FEC name applicable to the context and server names given.

Parameters
contextthe context of the new server
serverthe server name of the new server
Returns
a NAME16I object whose name field contains the suggested FEC name for the input parameters and whose integer field contains the status of the FEC name. Namely if the context and server already exist, then the assigned FEC name is returned along with the status 'TErrorList.name_already_exists'.
Exceptions
TineRuntimeErrorException(likely invalid_parameter or connection_timeout)

◆ removeDeviceServerFromENS()

static int de.desy.tine.addrUtils.ENSTools.removeDeviceServerFromENS ( String  context,
String  deviceServer 
)
static

Removes the given device server from the ENS database.

Parameters
contextis the context of the device server to be removed
deviceServeris the device server to be removed
Returns
0 upon success or a TINE error code

References de.desy.tine.client.TLink.close(), and de.desy.tine.client.TLink.execute().

◆ removeDeviceServerFromGroup()

static int de.desy.tine.addrUtils.ENSTools.removeDeviceServerFromGroup ( String  context,
String  deviceServer,
String  group 
)
static

Removes the given device server from the specified device group.

Parameters
contextis the context of the device group
deviceServeris the device server group member to be removed
groupis the device group
Returns
0 upon success or a TINE error code

References de.desy.tine.client.TLink.close(), and de.desy.tine.client.TLink.execute().

◆ removeFECFromENS()

static int de.desy.tine.addrUtils.ENSTools.removeFECFromENS ( String  fecName)
static

Removes the given FEC from the ENS database.

Parameters
fecNameis the FEC name to be removed from the ENS database
Returns
0 upon success or a TINE error code

References de.desy.tine.client.TLink.executeAndClose().

◆ sendExportInformationToENS()

static int de.desy.tine.addrUtils.ENSTools.sendExportInformationToENS ( SrvAddr  da,
FECInfo  info 
)
static

Sends the information to the ENS as if a booting FEC is issuing a plug-and-play registration.

This routine can be used by an ENS administrator to register aliases, etc.

Parameters
dathe the full server address information
infois the accompanying FEC information
Returns
0 upon success or a TINE error code

References de.desy.tine.client.TLink.executeAndClose().

◆ setAllowedDownTime()

static int de.desy.tine.addrUtils.ENSTools.setAllowedDownTime ( int  downTime)
static

Sets the allowed server down time at the ENS.

This applies to ALL servers in the ENS database and establishes a maximum duration a server is allowed to be down before being removed from the database

Parameters
downTimeis the allowed down time in seconds
Returns
0 upon success or a TINE return code

References de.desy.tine.client.TLink.close(), and de.desy.tine.client.TLink.execute().


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