fesa-instance

Example 2

Update bitmaps, like detailed status entries.

The bitmap information must be specified in an XML-file. As an example, a file bitmap1.xml may be given, describing two detatiled status bitmaps:
<BITMAP>
  <bitMap>
    <!-- first: declare entries in the bit specification -->
    <!--   give name of item in the bitmap description and the position where the generated bitmaps are to be stored -->
    <!--   here: items labeled "txt" are to be stored in configuration.detailedStatus_labels -->
    <!--     and, similarly, items labeled "reg" and "sev" -->
    <!--     remark: items labeled "num" are given for orientation only, they are not used here -->
    <bitMapDescription name='txt' entry='configuration.detailedStatus_labels'/>
    <bitMapDescription name='sev' entry='configuration.detailedStatus_severity'/>
    <bitMapDescription name='reg' entry='configuration.detailedStatus_MfuBitMapping'/>

    <!-- optionally: specify, where the number of bits should be placed -->
    <!-- here: number of bits are to be stored in configuration.detailedStatus_severity.dim -->
    <!--       and in configuration.detailedStatus_severity.dim -->
    <bitMapDimension   dest='configuration.detailedStatus_severity.dim'/>
    <bitMapDimension   dest='acquisition.detailedStatus.dim'/>

    <!-- now specify the bits -->
    <!-- for demonstration purpose, the number of bits is limited to 8 -->

    <!-- first a bitmap called "LimitedStatus" -->
    <bitMapping name='LimitedStatus'>
      <bit num="08"  reg="{4711,8}"    sev="INFO"            txt="PowerOn"/>
      <bit num="09"  reg="{4711,9}"    sev="ERROR_ON_FALSE"  txt="PowerFault"/>
      <bit num="10"  reg="{4711,10}"   sev="ERROR_ON_FALSE"  txt="TempPS"/>
      <bit num="11"  reg="{4711,11}"   sev="ERROR_ON_FALSE"  txt="H2OPS"/>
      <bit num="12"  reg="{4711,12}"   sev="ERROR_ON_FALSE"  txt="CurrOverload"/>
      <bit num="13"  reg="{4711,13}"   sev="INFO"            txt="PolarityNormal"/>
      <bit num="14"  reg="{4711,14}"   sev="ERROR_ON_FALSE"  txt="TempMagnet"/>
      <bit num="15"  reg="{4711,15}"   sev="ERROR_ON_FALSE"  txt="H2OMagnet"/>
    </bitMapping>

    <!-- then a bitmap called "ExtendedText" -->
    <bitMapping name='ExtendedText'>
      <bit num="08"  reg="{4711,8}"    sev="INFO"            txt="Power_Is_On"/>
      <bit num="09"  reg="{4711,9}"    sev="ERROR_ON_FALSE"  txt="Power_Has_Fault"/>
      <bit num="10"  reg="{4711,10}"   sev="ERROR_ON_FALSE"  txt="Temp_PS_Is_High"/>
      <bit num="11"  reg="{4711,11}"   sev="ERROR_ON_FALSE"  txt="H2O_PS_Is_High"/>
      <bit num="12"  reg="{4711,12}"   sev="ERROR_ON_FALSE"  txt="Current_Overloaded"/>
      <bit num="13"  reg="{4711,13}"   sev="INFO"            txt="Polarity_Is_Normal"/>
      <bit num="14"  reg="{4711,14}"   sev="ERROR_ON_FALSE"  txt="Temp_Magnet_Is_High"/>
      <bit num="15"  reg="{4711,15}"   sev="ERROR_ON_FALSE"  txt="H2O_Magnet_Is_High"/>
    </bitMapping>
  </bitMap>
</BITMAP>

Assume, a command file cmd2, defining modified status assignments for four devices (GTS3MU1, GTS3MU2, GTS3QD11, GTS3QD12) with contents as below is given:
dev  GTS3MU1   
     bitmap  LimitedStatus
dev  GTS3MU2   
     bitmap  LimitedStatus
dev  GTS3QD11  
     bitmap  ExtendedText
dev  GTS3QD12  
     bitmap  LimitedStatus

Assume the PowerSupplyHebt_DU deploy-unit tree is stored in ~/workspace/. When the above command file cmd2 is called with the command below, where the instance files are limited to one node by the option -n to node scuxl0234, and the bitmap definition of file bitmap, as above, is used
fesa-instance -t -d ~/workspace/PowerSupplyHebt_DU/ -b bitmap.xml -n scuxl0234 cmd2

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.

The output is, on the first sight, confusing because of the long text items which are modified. Close examination shows that the text entries for configuration.detailedStatus_severity, configuration.detailedStatus_labels and configuration.detailedStatus_MfuBitMapping are changed for four devices, presenting both the former and the replacing texts. As well are the entries for configuration.detailedStatus_severity.dim and acquisition.detailedStatus.dim changed to the now number of status bits.
/home/bel/krause/lnx/workspace/PowerSupplyHebt_DU//src/test/scuxl0234/DeviceData_PowerSupplyHebt_DU.instance
  GTS3MU1
    assigned bit-map: LimitedStatus
    configuration.detailedStatus_severity: {INFO,ERROR_ON_FALSE,ERROR_ON_FALSE,ERROR_ON_FALSE,ERROR_ON_FALSE,INFO,ERROR_ON_FALSE,ERROR_ON_FALSE,ERROR_ON_FALSE,ERROR_ON_FALSE,ERROR_ON_FALSE,ERROR_ON_FALSE,ERROR_ON_FALSE,ERROR_ON_FALSE,ERROR_ON_FALSE,INFO,INFO,ERROR_ON_FALSE,INFO,INFO,INFO,INFO,INFO,INFO,ERROR_ON_FALSE} -> {INFO,ERROR_ON_FALSE,ERROR_ON_FALSE,ERROR_ON_FALSE,ERROR_ON_FALSE,INFO,ERROR_ON_FALSE,ERROR_ON_FALSE}
    configuration.detailedStatus_labels: {PowerOn,PowerFault,TempPS,H2OPS,CurrOverload,PolarityNormal,TempMagnet,H2OMagnet,Ip,Ip1,T1T4,NoFRSIntl,Ud1,Ub0,DCCT,NotUsed,Remote,SiStOK,Load1,Load2,Load3,Load4,Load5,CurrControl,RealTimeError} -> {PowerOn,PowerFault,TempPS,H2OPS,CurrOverload,PolarityNormal,TempMagnet,H2OMagnet}
    configuration.detailedStatus_MfuBitMapping: {{4711,8},{4711,9},{4711,10},{4711,11},{4711,12},{4711,13},{4711,14},{4711,15},{4711,16},{4711,17},{4711,18},{4711,19},{4711,20},{4711,21},{4711,22},{4711,23},{4711,24},{4711,25},{4711,26},{4711,27},{4711,28},{4711,29},{4711,30},{4711,31},{4711,0}} -> {{4711,8},{4711,9},{4711,10},{4711,11},{4711,12},{4711,13},{4711,14},{4711,15}}
    configuration.detailedStatus_severity.dim: 25 -> 8
    acquisition.detailedStatus.dim: 25 -> 8
  GTS3MU2
    assigned bit-map: LimitedStatus
    configuration.detailedStatus_severity: {INFO,ERROR_ON_FALSE,ERROR_ON_FALSE,ERROR_ON_FALSE,ERROR_ON_FALSE,INFO,ERROR_ON_FALSE,ERROR_ON_FALSE,ERROR_ON_FALSE,ERROR_ON_FALSE,ERROR_ON_FALSE,ERROR_ON_FALSE,ERROR_ON_FALSE,ERROR_ON_FALSE,ERROR_ON_FALSE,INFO,INFO,ERROR_ON_FALSE,INFO,INFO,INFO,INFO,INFO,INFO,ERROR_ON_FALSE} -> {INFO,ERROR_ON_FALSE,ERROR_ON_FALSE,ERROR_ON_FALSE,ERROR_ON_FALSE,INFO,ERROR_ON_FALSE,ERROR_ON_FALSE}
    configuration.detailedStatus_labels: {PowerOn,PowerFault,TempPS,H2OPS,CurrOverload,PolarityNormal,TempMagnet,H2OMagnet,Ip,Ip1,T1T4,NoFRSIntl,Ud1,Ub0,DCCT,NotUsed,Remote,SiStOK,Load1,Load2,Load3,Load4,Load5,CurrControl,RealTimeError} -> {PowerOn,PowerFault,TempPS,H2OPS,CurrOverload,PolarityNormal,TempMagnet,H2OMagnet}
    configuration.detailedStatus_MfuBitMapping: {{4711,8},{4711,9},{4711,10},{4711,11},{4711,12},{4711,13},{4711,14},{4711,15},{4711,16},{4711,17},{4711,18},{4711,19},{4711,20},{4711,21},{4711,22},{4711,23},{4711,24},{4711,25},{4711,26},{4711,27},{4711,28},{4711,29},{4711,30},{4711,31},{4711,0}} -> {{4711,8},{4711,9},{4711,10},{4711,11},{4711,12},{4711,13},{4711,14},{4711,15}}
    configuration.detailedStatus_severity.dim: 25 -> 8
    acquisition.detailedStatus.dim: 25 -> 8
  GTS3KS2
  GTS2KS1
  GTS3KS1
  GTS3QD22
  GTS3QD21
  GTS3QD12
    assigned bit-map: LimitedStatus
    configuration.detailedStatus_severity: {INFO,ERROR_ON_FALSE,ERROR_ON_FALSE,ERROR_ON_FALSE,ERROR_ON_FALSE,INFO,ERROR_ON_FALSE,ERROR_ON_FALSE,ERROR_ON_FALSE,ERROR_ON_FALSE,ERROR_ON_FALSE,ERROR_ON_FALSE,ERROR_ON_FALSE,ERROR_ON_FALSE,ERROR_ON_FALSE,INFO,INFO,INFO,INFO,INFO,INFO,INFO,INFO,INFO,ERROR_ON_FALSE} -> {INFO,ERROR_ON_FALSE,ERROR_ON_FALSE,ERROR_ON_FALSE,ERROR_ON_FALSE,INFO,ERROR_ON_FALSE,ERROR_ON_FALSE}
    configuration.detailedStatus_labels: {PowerOn,PowerFault,TempPS,H2OPS,CurrOverload,PolarityNormal,TempMagnet,H2OMagnet,Ip,Ip1,T1T4,NoFRSIntl,Ud1,Ub0,DCCT,NotUsed,Remote,NotUsed,Load1,Load2,Load3,Load4,Load5,CurrControl,RealTimeError} -> {PowerOn,PowerFault,TempPS,H2OPS,CurrOverload,PolarityNormal,TempMagnet,H2OMagnet}
    configuration.detailedStatus_MfuBitMapping: {{4711,8},{4711,9},{4711,10},{4711,11},{4711,12},{4711,13},{4711,14},{4711,15},{4711,16},{4711,17},{4711,18},{4711,19},{4711,20},{4711,21},{4711,22},{4711,23},{4711,24},{4711,25},{4711,26},{4711,27},{4711,28},{4711,29},{4711,30},{4711,31},{4711,0}} -> {{4711,8},{4711,9},{4711,10},{4711,11},{4711,12},{4711,13},{4711,14},{4711,15}}
    configuration.detailedStatus_severity.dim: 25 -> 8
    acquisition.detailedStatus.dim: 25 -> 8
  GTS3QD11
    assigned bit-map: ExtendedText
    configuration.detailedStatus_severity: {INFO,ERROR_ON_FALSE,ERROR_ON_FALSE,ERROR_ON_FALSE,ERROR_ON_FALSE,INFO,ERROR_ON_FALSE,ERROR_ON_FALSE,ERROR_ON_FALSE,ERROR_ON_FALSE,ERROR_ON_FALSE,ERROR_ON_FALSE,ERROR_ON_FALSE,ERROR_ON_FALSE,ERROR_ON_FALSE,INFO,INFO,INFO,INFO,INFO,INFO,INFO,INFO,INFO,ERROR_ON_FALSE} -> {INFO,ERROR_ON_FALSE,ERROR_ON_FALSE,ERROR_ON_FALSE,ERROR_ON_FALSE,INFO,ERROR_ON_FALSE,ERROR_ON_FALSE}
    configuration.detailedStatus_labels: {PowerOn,PowerFault,TempPS,H2OPS,CurrOverload,PolarityNormal,TempMagnet,H2OMagnet,Ip,Ip1,T1T4,NoFRSIntl,Ud1,Ub0,DCCT,NotUsed,Remote,NotUsed,Load1,Load2,Load3,Load4,Load5,CurrControl,RealTimeError} -> {Power_Is_On,Power_Has_Fault,Temp_PS_Is_High,H2O_PS_Is_High,Current_Overloaded,Polarity_Is_Normal,Temp_Magnet_Is_High,H2O_Magnet_Is_High}
    configuration.detailedStatus_MfuBitMapping: {{4711,8},{4711,9},{4711,10},{4711,11},{4711,12},{4711,13},{4711,14},{4711,15},{4711,16},{4711,17},{4711,18},{4711,19},{4711,20},{4711,21},{4711,22},{4711,23},{4711,24},{4711,25},{4711,26},{4711,27},{4711,28},{4711,29},{4711,30},{4711,31},{4711,0}} -> {{4711,8},{4711,9},{4711,10},{4711,11},{4711,12},{4711,13},{4711,14},{4711,15}}
    configuration.detailedStatus_severity.dim: 25 -> 8
    acquisition.detailedStatus.dim: 25 -> 8
  GTS4MU1
  GTS3QT31
  GTS3QT32
  GTS4QT11
  GTS4QT12
  GTS4QT13
  GTS3KS3
  GTS4KS1
  GTS4KS2
  GTS4KS3
  GHFSKS1
  GTS5MU1
  GTS3QT33
  GTS5KS1
  GTE5KS1
  GTS3MU1_0
  GHFSMU1_0
  GTS6MU1_0
  GTS7MU1_0
  GE01MU4I
  file /home/bel/krause/lnx/workspace/PowerSupplyHebt_DU//src/test/scuxl0234/DeviceData_PowerSupplyHebt_DU.instance not modified

This topic: FESA > WebHome > FESA-Update-InstanceFiles > FESA-UpdateInstanceBitmap
Topic revision: 29 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