qumbia-reader  1.x
A generic client to read from Tango and Epics control systems
cumbia read command line client

Introduction

The qumbia-reader (cumbia read) application is a command line tool to read sources from different engines. EPICS, Tango and random modules are supported.

Features

Source name auto completion (Tango only, for the time being)

Install the qumbia-tango-findsrc-plugin from github and the included qumbia-tango-find-src tool (instructions in the project page) to obtain the Tango source bash auto completion.

Formula support

Formulas can be used through the formula plugin. See the plugin documentation and the example section below for more details.

cumbia-random module support

Read the cumbia random documentation to correctly provide the reader sources that can be used for testing. Specific cumbia-random source patterns allow to group threads, specify the range of generated data, the generation interval, in milliseconds, and the size. It is also possible to specify JavaScript files as sources, wherefrom a custom function supplies data.

Library internals awareness

Increase the output detail level to see how threads are grouped, understand how they are grouped by means of the cumbia random test features. Set a bound on the number of threads used by timers for polled sources to verify the impact on performance.

Property mode: get the configuration of the sources

Source configuration stored somewhere by the system can be obtained (if this is applies to the engine) Tango device, attribute and class properties can be fetched from the Tango database as well (requires Tango modules).

Tune application output

The command line output can be tuned in terms of

  • detail level (low, medim, high and debug)
  • format of numbers (printf style)
  • length of displayed data for arrays

Usage

cumbia installation provides two shortcuts to launch the qumbia-reader application:

  • cumbia read: read once or n times the specified source(s)
  • cumbia monitor: indefinitely monitor the specified source(s) until a key is pressed The latter, executes qumbia-reader –monitor

Started without options (equal to –help), the tool prints a summary of its functions

The list of sources ensue. The implementation supports Tango, EPICS and cumbia-random sources. For the latter, the random:// prefix is required. It is recommended to read the the cumbia random module documentation to learn about the required syntax for the sources.

Read

Simply call cumbia read followed by the list of sources. Sources from different engines can be mixed. By default, one reading is performed, unless –x is specified:

cumbia read test/device/1/double_scalar giacomo:ai1 random://rnd/1/0/10

Output:

cumbia read inj/diagnostics/rtbpm_inj.01//GetHorPos[0,1000] --truncate=8 --3 --format="%.4f"

Output of last command:

inj/diagnostics/rtbpm_inj.01->GetHorPos(0,1000): [12:12:23+0.716406] [double,1000] { -0.0228,-0.0091,-0.0158,-0.0180,-0.0232,-0.0160,-0.0124, ..., -0.0178 }
inj/diagnostics/rtbpm_inj.01->GetHorPos(0,1000): [12:12:24+0.883161] [double,1000] { -0.0190,-0.0145,-0.0172,-0.0174,-0.0173,-0.0198,-0.0131, ..., -0.0157 }
inj/diagnostics/rtbpm_inj.01->GetHorPos(0,1000): [12:12:25+0.885003] [double,1000] { -0.0132,-0.0187,-0.0174,-0.0091,-0.0112,-0.0142,-0.0135, ..., -0.0129 }
Note
In order to be auto completed and easily understood by the console without escape characters, Tango commands can be written in the form:
tango/device/name//command_name[arg1,arg2]

instead of the classical syntax

tango/device/name->command_name(arg1,arg2)

that would require inverted commas:

cumbia read "inj/diagnostics/rtbpm_inj.01->GetHorPos(0,1000)"

Both forms are accepted, but auto completion adopts the first syntax.

Monitor

Simply replace cumbia read with cumbia monitor to start monitoring one or more sources. Interrupt the process pressing any key.

Read (or monitor) and show more details

Output levels can be tuned with the –l=normal, –l=medium and –l=high The number of details increases, up to the –l=debug, that prints the whole data structure passed from the lower layer to the application (the CuData bundle contents)

Read sources configuration only

With the –property option it is possible to read the configuration of the sources: upper, lower bounds, alarm and warning thresholds, data format, measurement units, and so on:

cumbia read test/device/1/double_scalar giacomo:ai1 --property

Read Tango properties

Device properties

cumbia read --tp test/device/1:Description test/device/2:Description

List all device properties

The following command lists all properties of the given devices

cumbia read --tp test/device/1 test/device/2

Example output:

- test/device/1
--> description,helperApplication,helperApplication2Prop,helperApplication_old,polled_attr,poll_ring_depth,values,windowTitle
- test/device/2
--> description,polled_attr,poll_ring_depth

Filtered list of device properties

If the device name is followed by a semicolon and a wildcard (*) is present, then the filtered list of device properties matching the wildcard expression is returned:

cumbia read --tp test/device/1:helper*

The output will be:

- test/device/1
helper* --> helperApplication,helperApplication2Prop,helperApplication_old

List of attribute properties

List the attribute properties of test/device/1/double_scalar

cumbia read --tp test/device/1/double_scalar

Attribute property

Read the values property of the string_scalar attribute

cumbia read --tp test/device/1/string_scalar/values

Class property

Read the cvs_location property of the class TangoTest

cumbia read --tp TangoTest/cvs_location

List of properties of a given Tango class

The following command fetches the list of properties of the TdbArchiver and HdbArchiver classes:

qumbia-reader --tp TdbArchiver: HdbArchiver:

Output

- HdbArchiver
--> DbHost,DbName,DbSchema,Description,eventsDBUpdatePolicy,Facility,ProjectTitle,UseEvents
-------------------------------------------------
- TdbArchiver
--> DbHost,DbName,DbSchema,Description,Facility,ProjectTitle
Note
Class name must be terminated by a semicolon.
GetHorPos
inj diagnostics rtbpm_inj GetHorPos(0, 1000)
Definition: man.txt:68
reader
The qumbia reader(cumbia read) application is a command line tool to read sources from different engines. EPICS