-
Jan H. K. Timm authored
This commit belongs to issue #4, allow to set the EqFct code in mapping file. In VariableMapper a std::map with location(string) and code(int) was added. With getLocationAndCode() this map is returned and used in eq_creat.cc to add missing locations with 10 default, or with 'code' set in the <location> tag in the mappinmg xml file.
Jan H. K. Timm authoredThis commit belongs to issue #4, allow to set the EqFct code in mapping file. In VariableMapper a std::map with location(string) and code(int) was added. With getLocationAndCode() this map is returned and used in eq_creat.cc to add missing locations with 10 default, or with 'code' set in the <location> tag in the mappinmg xml file.
serverTestVariableMapperWithLocationAndCode-DoocsVariableConfig.xml 1.11 KiB
<?xml version="1.0" encoding="UTF-8"?>
<device_server xmlns="https://github.com/ChimeraTK/ControlSystemAdapter-DoocsAdapter">
<!-- this is already in config file with code 10 -->
<location name="DOUBLE">
<D_spectrum source="TO_DEVICE_ARRAY"/>
</location>
<!-- this is created new and shuold have code 10 (10 is default, if it is not set)-->
<location name="CREATED" >
<property name="COOL" source="/FLOAT/TO_DEVICE_SCALAR"/>
</location>
<!-- this is created new but... -->
<location name="NEW" >
<property name="START" source="/FLOAT/TO_DEVICE_SCALAR"/>
</location>
<!-- the code is set to 12 ( not default) -->
<location name="NEW" code="12" >
<property name="START2" source="/DOUBLE/TO_DEVICE_SCALAR"/>
</location>
<!-- you can set the code, or not, but it wust be the same code as in config file -->
<location name="DOUBLE" code="10" >
<D_spectrum source="FROM_DEVICE_ARRAY">
<start>123.</start>
<increment>0.56</increment>
</D_spectrum>
</location>
<location name="DOUBLE" code="10" >
<property name="POOL" source="/FLOAT/TO_DEVICE_SCALAR"/>
</location>
</device_server>