How-To: TMIS

Introduction

TMIS (Timing Message Information Service) is a quick evaluation on distribution of timing messages via the ACC controls network. The main idea is provide something compact, leight-weight and well-performing with small foot-print. The concept is to cut the saftlib tool saft-ctl into two pieces and reconnect them via a simple communication layer.

Disclaimer. This is intended for evaluation purposes only.

Server
A server tmis-server must run on a frontend that is connected to the timing network. Upon startup, a prefix and mask can be specified exactly the same way as with other saftlib tools (example: saft-ctl). This allows limiting the published timing messages to specific timing groups, event numbers ... This allows users to use and configure servers to their needs. The server provides two services.
  • tmis_SERVERNAME_message, timing message as is
    • uint64_t: EventId
    • uint64_t: parameter field
    • uint64_t: (high 32bit word: flags, low 32bit word: TEF)
    • uint64_t: deadline
  • tmis_SERVERNAME_nmessage, number of published timing messages
    • uint32_t: # of messages
Communication
The communication layer is DIM, which is a portable, light weight, package for information publishing, data transfer and inter-process communications.

Remember to configure the environment variable DIM_DNS_NODE.

Client
In principle, everyone can directly subscribe to the relevant services via DIM.

As an example, a client tmis-client is provided. This client covers two use cases.
  • view messages; this is useful for non-frontends such as th asl cluster
  • inject messages into a local timing receiver; this is useful when the frontend has a timing receiver but is not connected to the timing network. No precise timing. But maybe useful for testing or for slow equipment.

Server

Usage: ./tmis-server <device name> [OPTIONS] <server name>

  -h                   display this help and exit
  -f                   use the first attached device (and ignore <device name>)

  <name> <eventID> <mask> <offset> configure server, offset is in ns, CTRL+C to exit (try 'hello 0x0 0x0 0' for ALL)
                       info: these values will be used as filter for publishing messages.


This tool provides the server for the Timing Messages Information Service.

Tip: For using negative values when configuring the server, consider
using the special argument '--' to terminate option scanning.

Report bugs to <d.beck@gsi.de> !!!
Version 101, Licensed under the GPL v3.

Examples:
  • tmis-server tr0 test-sis18 0x112c000000000000 0xffff000000000000 0, start server test-sis18 and provides a service for timing messages at Group ID SIS18_RING
  • tmis-server tr0 test-sis18-kickstart 0x112c031000000000 0xfffffff000000000 0, start server test-sis18-kickstart and provides a service for Group ID SIS18 and EVT_KICK_START1
  • tmis-server tr0 test 0x0 0x0 0, start server test and provides a service for all messages
  • Important: the name of the server must be unique!

Client

Usage: ./tmis-client <device name> [OPTIONS] <server name>

  -h                   display this help and exit
  -f                   use the first attached device (and ignore <device name>)
  -d                   display values in dec format
  -x                   display values in hex format
  -v                   more verbosity, usefull with command 'snoop'
  -p                   print message to screen
  -i                   inject message into local timing receiver
  -U                   display/inject absolute time in UTC instead of TAI
  -L                   used with command 'inject' and -U: if injected UTC second is ambiguous choose the later one

  <server name> <eventID> <mask> <offset> configure client, offset is in ns, CTRL+C to exit (try 'hello 0x0 0x0 0' for ALL)
                       info: these values will be used as filter when injecting messages into the local TR (option '-i')
                       or when printing message data to the screen)


This tool provides a client for the Timing Messages Information Service.

Tip: For using negative values when configuring the client, consider
using the special argument '--' to terminate option scanning.

Report bugs to <d.beck@gsi.de> !!!
Version 101, Licensed under the GPL v3.

Examples:
  • tmis-client tr0 -vxp test 0x0 0x0 0, subscribes to the service and prints all messages to the screen, useful for ASL
  • tmis-client tr0 -vxi test 0x0 0x0 0, subscribes to the service and injects all messages into the the local timing receiver, useful for FECs without connection to the timing network
    • in case of high noise of unwanted events one can reduce the load on saftlib and FPGA by filtering messages before they are injected
    • tmis-client tr0 -vxi test0x112c000000000000 0xffff000000000000 0, injects only messages for Group ID SIS18_RING
    • tmis-client tr0 -vxi test0x112c031000000000 0xfffffff000000000 0, injects only messages for Group ID SIS18_RING and EVT_KICK_START1

-- DietrichBeck - 25 Jan 2021
Topic revision: r3 - 25 Jan 2021, DietrichBeck
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback