(D)evice (EX)plorer

Command line access to FESA Devices (for DevAcc devices routing to prophelper output) based on Udo Krauses Python-interface for CMW.


dex comes in different flavours:
  1. pdex -> Accessing the devices through the (P)roductive environment.
  2. ddex -> Accessing the devices through the (D)evelopment environment.
  3. idex -> Accessing the devices through the (I)evelopment environment.
Device Explorer uses Python module cmwrda.which requires the options -e(int|dev|pro) as options. To get rid of this option djungle dex can be called in its different flavours

In the following dex will be used to refer to both.

Easiest example

ddex YR03KD1D     # Access Status property of device YR03KD1D

For more sophisticated examples see below.


Check for latest usage informations using option -h.
(i|d|p)dex -h


pdex YR03KD1D                        # Access Status property of device
idex YR03KD1D Setting -s p3          # Access Setting property with selector BP = 3
idex YR03KD1D S                      # Use shortform of 'Setting' to access property
ddex YR03KD1D Acquisition -s p3:7    # Access Acquisition property for the BPs 3 to 7
pdex YR03KD1D -i -m                  # Subscribe to Status, Setting and Acquisition property (-m for monitoring)
pdex YR03KD1D -scanlsa               # Ask LSA which BPs should have been supplied with data
idex YR03KD1D -n                     # Show all 'neighboring' devices residing on the same DU
ddex scuxl0244                       # Show all devices on frontend 
ddex scuxl0244 Acquisition -u        # Accesses Acquisition property of all devices on frontend
ddex -h                              # Get awesome help

Access via batch files

dex is able to process batch files to manage reoccuring tasks with several device accesses. Batch files for the device explorer end with ".dex". Calling dex with option -f reads and executes the batchfile: dex -f myfile.dex

IMPORTANT: Every dex-command needs it's own line.

Syntax for reading:
DEV mydev
DEV mydev PROP myprop
DEV mydev PROP myprop ITEM myitem 

Syntax for writing (Only double values accepted until now):
DEV mydev PROP myprop ITEM myitem=0.815

Syntax for other things:
DEV mydev ONLINE   # reads Status property and evaluates opReady
SLEEP 1.23         # waits 1.23 seconds

# Nice comment for a nice example
DEV YRT1KH1 PROP Setting ITEM current
# Best comment ever!!!!!!1111einself

Feature requests

  • First of all, mark implemented features with Done and describe shortly how they must be used.

  • enable to pass filter for filtered properties (specifically strings) [TH]
  • possiblity to draw functions from coeff-arrays [maw - pkain]
  • option (e.g. --force) to don't stop output on error but to continue with next device (in *.dex file) [LH]
  • option for single line output with *.dex file, e.g. not
    |-- opReady = True
    |-- opReady = False
    GTV2MU2 Status.opReady = True
    GTV2MU3 Status.opReady = False
    May be difficult for several items. [LH]
  • defining two items like DEV GHHTMU1 PROP Status ITEM opReady ITEM status in a *.dex file does not lead to an error, but only the last item (status in this case) is put out. [LH]
  • option to pass one or more parameters to the *.dex file, e.g. to switch power on or off the *.dex file would look (in pseudo bash syntax) like
    DEV GTK1MU1 PROP Power ITEM power=${p1} 
    DEV GTK1MU2 PROP Power ITEM power=${p1} 
    and the command line pdex -f myfile.dex 1 or so to switch the power on for all devices. [LH]
  • when an acquisition property was read, output the multiplexing context as well [LH]
    • perhaps controlled via an option; one may not want the mux context in any case
    • format the output; each field of the event pattern (format, flags, sid, bpid, event, readable timestamp, ...); see Format of a Timing Message
  • Monitor with pdex GTV2QD11 -i -m3 -s p2 works, but not with pdex GTV2QD11 Acquisition -m3 -s p2. [LH]
  • Access the Configuration property with pdex -c YR02KD does not yet work. [LH] Done
  • Access the Configuration property without DB access does not yet work as well. [LH] Done
    asl743$ pdex -x PowerSupplyCry_DU.scuxl0145 YR02KD Configuration NOMEN = YR02KD | Configuration |-- ERROR: Device 'YR02KD' has no property named 'Configuration'. |-- Try one of: |-- Acquisition |-- Connect ... |-- Version 
  • Output the properties' value-items as well. Suggestion: pdex -l YR02DC1 lists all properties (which is already the case) and pdex -l YR02DC1 Setting lists all value-items of the property Setting. [LH]
Topic revision: r32 - 11 Dec 2019, MatthiasWiebel
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