Closed astante closed 9 years ago
I want to add that sometimes the data is in hexadecimal form:
<Variable Name="NID_RADIO" >
<DetailedName>Radio subscriber number.</DetailedName>
<Description>Quoted as a 16 digit decimal number. The number is to be entered left adjusted starting with the first digit to be dialled. Padding by the special value F shall be added after the least significant digit of the number. For further information about NID_RADIO refer to SUBSET-054.</Description>
<Specs Length="64 bits" MinVal="0" MaxVal="9999999999999999" Formula="Binary Coded Decimal" >
<Special Value="A-E" Description="Not Used" />
<Special Value="F" Description="Use value F for digit to indicate no digit (if number shorter than 16 digits)" />
<Special Value="FFFF FFFF FFFF FFFF" Description="Use the short number stored onboard" />
</Specs>
</Variable>
In general, all occurences of "spare" should not be transferred to the enum.
In the example, the valid range for M_CURRENT is between 0 and 1000. It has to be multiplied via "Formula=10A" to reach the MaxVal="10000 A". So, it can be seen that the indicated special values are beyond the range.
The two other examples are a bit more complex. For the already existing transformation to C, the enum values have integer values assigned (see https://github.com/openETCS/dataDictionary/blob/master/Artifacts/subset-026-7/Decoder/Delivery/GeneratedC/opnETCS_Variables.h ). Search for typedef enum { M_LINEGAUGE_G1 = 1 , M_LINEGAUGE_GA = 2 , M_LINEGAUGE_GB = 4 , M_LINEGAUGE_GC = 8 } M_LINEGAUGE ;
In this case, the "spare" was not transformed.
The xml contains special values which are not consistently stored in the xml. For example some special values contain ranges
other have value encoded in binary format
while other have a completly different way to store the information
How should we process that data?