FeeServer

From ift

back to: Detector Control System


Overview

... (to be filled)


FeeServer Download

Current releases of the FeeServer with RCU-like ControlEngine (fits for TPC and PHOS) are available from the Download page.


Versions of the FeeServer core software can be downloaded from the ZTT web pages. This package only contains the FeeSever core, the needed DIM framework libraries and a dummy CE (something like a echo server), the real CE depends on the detector and requires the appropriated hardware).


Compilation

After unpacking the compressed archive (tar xzvf <filename> ) change to the directory. The package must be configured by running the ./configure script, after configuration for the desired platform type make. The script has several options:

  • --host <host environment> : selection of the cross compiler
  • --disable-rcu  : RCU related functionality (in this wiki you will only find RCU-like FeeServers, so there is only the option to turn it off)
  • --enable-tpc  : TPC related functionality (so far there is none, all is included in the RCU target)
  • --enable-phos  : PHOS related functionality
  • --enable-mastermode: Enable special features (e.g. shell command execution, FeeServer update)
  • --enable-rcudummy  : Enable a dummy implementation of the RCU CE. This will skip all the hardware accesses.

Try --help to get a comprehensive help or --help=short to get information on the package specific options.

If you want to build the FeeServer for the armlinux on the DCS board you need a Cross Compiler. Currently arm-uclibc-gcc 3.3.1 is used. To configure the package for the cross compiler run the configure script like:

./configure --host arm
make

Be sure that the path of the cross compiler is added to the PATH environment variable (more help).


If you plan to compile the FeeServer core package please have a look into the README file which comes along with the package.

Preparation

To run the FeeServer on the DCS board copy it to the board wherever you want to have it. The second, strongly recommended, possibility is to mount a network disk on the board. The FeeServer package supports automatic copying to whatever folder through the standard make install command. The location can be specified by the --prefix option to the configure script.

A few more variables have to be set:

  • DIM_DNS_NODE(mandatory) denotes the host where a Name Server for the DIM framework (dns - DIM Name Server) is running.
  • FEE_SERVER_NAME(mandatory) for the name of the FeeServer (as it will pop up in the DIM system )
  • FEE_LOG_LEVEL(optional) default logging level of the FeeServer
  • FEESERVER_FEC_MONITOR(optional) specifies the valid FECs
    its a string of '0' and '1', missing entries are set to 0, e.g. '01001' puts FEC 2 and 5 into the configuration


!!! IMPORTANT !!! NOTE:

Since version 0.7.0: The environment variable for the FeeServer name has changed to FEE_SERVER_NAME. (prior versions: DIM_SERVER_NAME)

Running the FeeServer

To execute FeeServer properly please follow these steps:

  • make sure that the dns for DIM is running on the machine you specified
  • !!! NEW !!! since version 0.7.0:
    finally run sh startFeeServer.sh
    This script starts the FeeServer and takes care of various features.

The starting script also accepts an optional parameter: You can also set the FeeServer name by passing it to the starting script. The starting script automatically restarts the FeeServer, if it exits with an unknown error/exit value.

For debugging purpose it is convenient to start the FeeServer directly like ./feeserver. In that case, the restart and update features will not work.

Important Notes

  • for full functionality start the FeeServer only with the startFeeServer.sh script.
  • interface of FeeServer and CE changed in version 0.7.0
  • The service name scheme for CE service has changed:
    old style: servername/servicename -> new style: servername_servicename
    (These changes for ACK-, MSG- and Command-channel will follow.)
  • never turn on mastermode unless you are shure that your network is behind a firewall to avoid abuse.

See also the README and ChangeLog - files of the FeeServer package.


ControlEngine guidelines

Following some notes, which should be taken account of when developing a ControlEngine.

  • We included a demo function for initializing an "Item" in our dummy CE. When writing an own CE, it is best copying and using this function in order to get a proper initialized "Item".
  • Don't use static created "Items", especially don't use static allocated memory for the "Item" names. This would case the clean up to hang and a proper exit would be no longer possible.
  • Please obey the DCS naming and numbering convention, when naming an "Item". more under: http://alicedcs.web.cern.ch/AliceDCS/
  • Provide the "Items" with a default deadband. (Else the deadband will be 0, and the update rate would get to high -> to much traffic).
  • After the CE has been initialized, let this thread sleep for approx. 2-5 seconds (this gives the FeeServer time start the serving functionality inside the DIM framework).
  • In "cleanUpCE()", the CE don't need to clean and/or free "Items" and its members. (In fact it must not do it, this would crash the FeeServer during its cleanup.)
  • Don't call the createLogMessage() function during initializing the CE. (after the above mentioned sleep is fine). This service is only available after the DIM serving functionality has been started.
  • Be careful with sending log messages, especially in rapidly repeated checks/functions, this can pile up your log file extremely. Even consider carefully the specified log level; MSG_ALARM should be only for events, that could damage or destroy the system/hardware.
  • If, while testing, certain log messages of the CE don't appear, check the set log levels in FeeServer and InterComLayer. They may have filtered these messages. To set the default log level of the FeeServer, you can also use the environment variable FEE_LOG_LEVEL before starting the FeeServer.

ControlEngine implementations