fesa-instance

Example 1

Modify entries for single devices and a group of devices, using accumulation of settings. Assume, a command file cmd1 with contents as below is given:
GR group1           # define group of nomenclatures
  n  GTV1MU1
  n  GTE4QT31
  n  GTE4QT32
  n  GTE4QT33


ACC acc1              # define an accumulation of commands
  v configuration.busType          MIL_BUS
  v configuration.powerSupplyType  ACU
  e AcquisitionTimerEvent          ate


# settings for all devices defined in group1
group group1
  v configuration.busType          SCU_BUS
  e StatusUpdateTimerEvent         statusOnEvent
  a acc1            # use all setting defined in accumulation


# settings for single devices

d GTV1MU1
  v configuration.powerSupplyNumber  5
  v setting.inverter                 POS_INVERTER

d  GHHTQD11
  a acc1            # use all setting defined in accumulation
  v configuration.busType       MY_BUS

d  GHHTQD12
  v configuration.timingDomain  NoDomain
  v configuration.description   "Quadrupol Duplett"
  v configuration.busType       YOUR_BUS


Assume the PowerSupplyHebt_DU deploy-unit tree is stored in ~/workspace/. The above command file can be executed either in the directory ~/workspace/PowerSupplyHebt_DU or anywhere when the directory is specified by option -d . It will walk through all instance files, modifying only the given nomenclatures.

Modification can be limited to single instance files by using option -n. Calling the above command file cmd1 with the command
$ fesa-instance.py -t -d ~/workspace/PowerSupplyHebt_DU/ -n scuxl0218 cmd1

the output given below is generated. Since fesa-instance is called with option -t, the instance file is not modified. Omitting the -t option would result in modifying the instance file.
/home/bel/krause/lnx/workspace/PowerSupplyHebt_DU//src/test/scuxl0218/DeviceData_PowerSupplyHebt_DU.instance
  GHHTQD11
    configuration.busType: SCU_BUS -> MIL_BUS
    configuration.powerSupplyType: MIL -> ACU
    event-mapping AcquisitionTimerEvent: acqOnEvent -> ate
    configuration.busType: SCU_BUS -> MY_BUS
  GHHTQD12
    configuration.timingDomain: GHHTMU1_TO_HHT#512 -> NoDomain
    configuration.description: ?? -> Quadrupol Duplett
    configuration.busType: SCU_BUS -> YOUR_BUS
  GHHTQD21
  GHHTQD22
  GHHTQT31
  GHHTQT32
  GHHTQT33
  GTS1QD11
  GTS1QD12
  GTE3QD11
  GTE3QD12
  GTE4QD11
  GTE4QD12
  GTV1MU1
    configuration.powerSupplyNumber: 65 -> 5
    setting.inverter: NO_INVERTER -> POS_INVERTER
    event-mapping StatusUpdateTimerEvent: NONE -> statusOnEvent
    configuration.busType: SCU_BUS -> MIL_BUS
    configuration.powerSupplyType: MIL -> ACU
    event-mapping AcquisitionTimerEvent: acqOnEvent -> ate
  GTV1MU2
  GHTMKX1
  GHTMKY1
  GHTMKX2
  GHTMKY2
  GTE4QT31
    event-mapping StatusUpdateTimerEvent: NONE -> statusOnEvent
    configuration.busType: SCU_BUS -> MIL_BUS
    configuration.powerSupplyType: MIL -> ACU
    event-mapping AcquisitionTimerEvent: acqOnEvent -> ate
  GTE4QT32
    event-mapping StatusUpdateTimerEvent: NONE -> statusOnEvent
    configuration.busType: SCU_BUS -> MIL_BUS
    configuration.powerSupplyType: MIL -> ACU
    event-mapping AcquisitionTimerEvent: acqOnEvent -> ate
  GTE4QT33
    event-mapping StatusUpdateTimerEvent: NONE -> statusOnEvent
    configuration.busType: SCU_BUS -> MIL_BUS
    configuration.powerSupplyType: MIL -> ACU
    event-mapping AcquisitionTimerEvent: acqOnEvent -> ate
  GTH4QD11
  GTH4QD12
  GTH4QD21
  GTH4QD22
  GTE4QT21
  GTE4QT22
  GTE4QT23
  GTH3MU1
  GTH4MU1
  GTH4QD31
  GTH4QD32
  file /home/bel/krause/lnx/workspace/PowerSupplyHebt_DU//src/test/scuxl0218/DeviceData_PowerSupplyHebt_DU.instance not modified
Topic revision: r6 - 30 Jun 2020, 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