fesaprop / fesa-prop

Module fesaprop

A Python module to extract structure of properties from a FESA class description file.

The module implements the classes:
Properties: Contains the Property objects for the instance file
Property: Contains ValueItem objects and an AcquisitionContext object
ValueItem: Description of a single value item
AcquisitionContext: Contains ContextItem objects
ContextItem: Description of a context item, similar to a ValueItem objects

Properties may be limited to the definition in a subset.

For a short description load the module in Python and then type help(fesaprop).

Command Line Tool fesa-prop

The module runs also as a command line tool. The tool is available as command line call fesa-prop.

Usage

usage : fesa-prop [-h] [-D] [-M] [-s] <design-file> [<subset-name>]

list all properties, followed with idented listing of value-items and contexts
in case of subsets only properties for a given subset are displayed

options:
  -h : output this help and exit
  -M : no output of meta information (value items .._min, .._max, .._unit)
  -D : no display of description of properties
  -s : list subsets, defined in design file

output:
    property-entry:     P <name> | <type> | parameter
    value-item-entry:     V <name> | <type> | parameter
    context-item-entry:   C <name> | <type> | parameter

Example

A demonstration of the structure can be obtained by running fesaprop from the command line, with a given FESA instance file. Assuming a FESA class description file PowerSupply is contained in the usual workspace subdirectory, just call

/common/usr/cscofe/python/fesaprop.py workspace/PowerSupply/src/PowerSupply.design  BasicPS

This will result in an output, shown below, where lines with starting letters P denote a Property object, V a ValueItem object and C a ContextItem object

Properties for subset BasicPS

P Init | setting | GSI-Init-Property | multiplexed: False | Control property, used to initialize the device with default values from the device instantiation file.
P Reset | setting | GSI-Reset-Property | multiplexed: False | Control property, used to reset the device while keeping the persistent data.
P Setting | setting | GSI-Setting-Property | multiplexed: True | Used for setting hardware parameters for controlling the device.
  V current | value-item | scalar | double | INOUT |  
  V current_units | value-item | array | char | OUT |  
  V current_min | min-value-item | scalar | double | OUT |  
  V current_max | max-value-item | scalar | double | OUT |  
P Inverter | setting | GSI-Setting-Property | multiplexed: False | 
  V invert | value-item | scalar | INVERTER_POSITION | INOUT |  
  V updateFlags | update-flag-item | scalar | NOTIFICATION_UPDATE | OUT |  
  V cycleName | cycle-name-item | array | char | OUT |  
P DCValue | setting | GSI-Setting-Property | multiplexed: False | 
  V current | value-item | scalar | double | INOUT |  
  V current_units | value-item | array | char | OUT |  
  V current_min | min-value-item | scalar | double | OUT |  
  V current_max | max-value-item | scalar | double | OUT |  
  V processIndex | value-item | scalar | double | INOUT |  
  V processIndex_min | min-value-item | scalar | double | OUT |  
  V processIndex_max | max-value-item | scalar | double | OUT |  
  V processIndex_units | value-item | array | char | OUT |  
P DCMode | setting | GSI-Setting-Property | multiplexed: False | 
  V mode | value-item | scalar | bool | INOUT |  
P Connect | setting | GSI-Setting-Property | multiplexed: False | 
  V connect | value-item | scalar | bool | INOUT |  
  V updateFlags | update-flag-item | scalar | NOTIFICATION_UPDATE | OUT |  
  V cycleName | cycle-name-item | array | char | OUT |  
P Power | setting | GSI-Power-Property | multiplexed: False | Returns the current software and hardware versions of a piece of equipment.
  V updateFlags | update-flag-item | scalar | NOTIFICATION_UPDATE | OUT |  
  V cycleName | cycle-name-item | array | char | OUT |  
  V power | power-item | scalar | DEVICE_POWER | INOUT |  
P Status | acquisition | GSI-Status-Property | multiplexed: None | Used to display the (cycle independent) overall status of the device. Detailed status information may be additionally added to this property.
  V dcMode | value-item | scalar | bool | OUT |  
  V runtimeEnvironmentOk | value-item | array | bool | OUT |  
  V runtimeEnvironmentOk_labels | value-item | array2D | char | OUT |  
  V acqStamp | acq-stamp-item | scalar | int64_t | OUT |  
  V updateFlags | update-flag-item | scalar | NOTIFICATION_UPDATE | OUT |  
  V cycleName | cycle-name-item | array | char | OUT |  
  V cycleStamp | cycle-stamp-item | scalar | int64_t | OUT |  
  V status | status-item | scalar | DEVICE_STATUS | OUT |  
  V detailedStatus | detailed-status-item | array | bool | OUT |  
  V detailedStatus_labels | detailed-status-labels-item | array2D | char | OUT |  
  V detailedStatus_severity | detailed-status-severity-item | array | DETAILED_STATUS_SEVERITY | OUT |  
  V powerState | powerState-item | scalar | DEVICE_POWER_STATE | OUT |  
  V control | control-item | scalar | DEVICE_CONTROL | OUT |  
  V interlock | interlock-item | scalar | bool | OUT |  
  V opReady | opReady-item | scalar | bool | OUT |  
  V modulesReady | modulesReady-item | scalar | bool | OUT |  
  V --- | error_collection-item |  |  | OUT |  
P ModuleStatus | acquisition | GSI-ModuleStatus-Property | multiplexed: None | Gives detailed information on the state of 3rd party hardware and software components which are required to operate the device.
  V acqStamp | acq-stamp-item | scalar | int64_t | OUT |  
  V updateFlags | update-flag-item | scalar | NOTIFICATION_UPDATE | OUT |  
  V cycleName | cycle-name-item | array | char | OUT |  
  V cycleStamp | cycle-stamp-item | scalar | int64_t | OUT |  
  V moduleStatus | module-status-item | array | MODULE_STATUS | OUT |  
  V moduleStatus_labels | module-status-labels-item | array2D | char | OUT |  
P Acquisition | acquisition | GSI-Acquisition-Property | multiplexed: None | Used for returning acquisition data which is retrieved from the hardware.
  C timingGroupID | timingGroupID | scalar | int32_t | OUT |  
  C eventNumber | eventNumber | scalar | int32_t | OUT |  
  C eventStamp | eventStamp | scalar | int64_t | OUT |  
  C sequenceStartStamp | sequenceStartStamp | scalar | int64_t | OUT |  
  C processStartStamp | processStartStamp | scalar | int64_t | OUT |  
  C chainStartStamp | chainStartStamp | scalar | int64_t | OUT |  
  C acquisitionStamp | acquisitionStamp | scalar | int64_t | OUT |  
  C sequenceIndex | sequenceIndex | scalar | int32_t | OUT |  
  C processIndex | processIndex | scalar | int32_t | OUT |  
  C chainIndex | chainIndex | scalar | int32_t | OUT |  
  V currentSet | value-item | scalar | double | OUT |  
  V currentSet_units | value-item | array | char | OUT |  
  V current | value-item | scalar | double | OUT |  
  V current_units | value-item | array | char | OUT |  
  V current_min | min-value-item | scalar | double | OUT |  
  V current_max | max-value-item | scalar | double | OUT |  
P Configuration | acquisition | GSI-Acquisition-Property | multiplexed: None | Used for checking of hardware configuration and libVersions.
  C timingGroupID | timingGroupID | scalar | int32_t | OUT |  
  C eventNumber | eventNumber | scalar | int32_t | OUT |  
  C eventStamp | eventStamp | scalar | int64_t | OUT |  
  C sequenceStartStamp | sequenceStartStamp | scalar | int64_t | OUT |  
  C processStartStamp | processStartStamp | scalar | int64_t | OUT |  
  C chainStartStamp | chainStartStamp | scalar | int64_t | OUT |  
  C acquisitionStamp | acquisitionStamp | scalar | int64_t | OUT |  
  C sequenceIndex | sequenceIndex | scalar | int32_t | OUT |  
  C processIndex | processIndex | scalar | int32_t | OUT |  
  C chainIndex | chainIndex | scalar | int32_t | OUT |  
  V slaveConfig | value-item | array2D | char | OUT |  
P DCValueAcq | acquisition | GSI-Acquisition-Property | multiplexed: None | get device actual value when in DC-mode
  C timingGroupID | timingGroupID | scalar | int32_t | OUT |  
  C eventNumber | eventNumber | scalar | int32_t | OUT |  
  C eventStamp | eventStamp | scalar | int64_t | OUT |  
  C sequenceStartStamp | sequenceStartStamp | scalar | int64_t | OUT |  
  C processStartStamp | processStartStamp | scalar | int64_t | OUT |  
  C chainStartStamp | chainStartStamp | scalar | int64_t | OUT |  
  C acquisitionStamp | acquisitionStamp | scalar | int64_t | OUT |  
  C sequenceIndex | sequenceIndex | scalar | int32_t | OUT |  
  C processIndex | processIndex | scalar | int32_t | OUT |  
  C chainIndex | chainIndex | scalar | int32_t | OUT |  
  V currentSet | value-item | scalar | double | OUT |  
  V currentSet_units | value-item | array | char | OUT |  
  V current | value-item | scalar | double | OUT |  
  V current_units | value-item | array | char | OUT |  
  V current_min | min-value-item | scalar | double | OUT |  
  V current_max | max-value-item | scalar | double | OUT |  
P Version | acquisition | GSI-Version-Property | multiplexed: None | 
  V acqStamp | acq-stamp-item | scalar | int64_t | OUT |  
  V updateFlags | update-flag-item | scalar | NOTIFICATION_UPDATE | OUT |  
  V cycleName | cycle-name-item | array | char | OUT |  
  V cycleStamp | cycle-stamp-item | scalar | int64_t | OUT |  
  V classVersion | version-item | array | char | OUT |  
  V deployUnitVersion | version-item | array | char | OUT |  
  V fesaVersion | version-item | array | char | OUT |  
  V daqAPIVersion | version-item | array | char | OUT |
%ENDTWISTY%
Topic revision: r2 - 13 Oct 2021, UdoKrause
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