There seems to be a problem for the tool to decode reserved expansion fields that are composed using different layers of compound types.
I generated an example xml script that should decode the explicit RE data item, with a 'Field 1' as first bit of the first compound item and 'M5N' as the second bit of the first compound item. The rest is not used in the data.
In my ASTERIX data, I only have data with the 'M5N' bit set to 1. With this bit set, the code should jump to the last compound part of the xml below, which it does correctly (When I just read a 'fixed' variable with length 1 instead of interpreting the data as a compound - see commented part, I can see the FSPEC and first byte of data of this compound item, but whenever it is defined as 'compound', the code returns errors.
Is there a way to decode a RE field with this outlay:
Explicit
- Compound
- Compound
- Compound
<DataItem id="RE">
<DataItemName>Reserved Expansion Field</DataItemName>
<DataItemDefinition>RE</DataItemDefinition>
<DataItemFormat desc="Explicit">
<Explicit>
<Compound>
<Variable>
<Fixed length="1">
<Bits bit="8">
<BitsShortName>F1</BitsShortName>
<BitsName>Field 1 - check MSSR manual what this means</BitsName>
<BitsPresence>1</BitsPresence>
</Bits>
<Bits bit="7">
<BitsShortName>M5N</BitsShortName>
<BitsName>Mode 5 Reports, New Format</BitsName>
<BitsPresence>2</BitsPresence>
</Bits>
<Bits from="6" to="2">
<BitsShortName>SP</BitsShortName>
<BitsName>Spare</BitsName>
<BitsConst>0</BitsConst>
</Bits>
<Bits bit="1" fx="1">
<BitsShortName>FX</BitsShortName>
<BitsName>Extension Indicator</BitsName>
<BitsConst>0</BitsConst>
</Bits>
</Fixed>
</Variable>
<Compound>
<Variable>
<Fixed length="1">
<Bits bit="8">
<BitsShortName>TI1</BitsShortName>
<BitsName>Information Target 1</BitsName>
<BitsPresence>1</BitsPresence>
</Bits>
<Bits bit="7">
<BitsShortName>TI2</BitsShortName>
<BitsName>Information Target 2</BitsName>
<BitsPresence>2</BitsPresence>
</Bits>
<Bits from="6" to="2">
<BitsShortName>spare</BitsShortName>
<BitsName>Spare bits set to 0</BitsName>
<BitsConst>0</BitsConst>
</Bits>
<Bits bit="1" fx="1">
<BitsShortName>FX</BitsShortName>
<BitsName>Extension Indicator</BitsName>
<BitsValue val="0">No extension</BitsValue>
<BitsValue val="1">Extension</BitsValue>
</Bits>
</Fixed>
</Variable>
</Compound>
<Compound>
<Variable>
<Fixed length="1">
<Bits bit="8">
<BitsShortName>SUM</BitsShortName>
<BitsName>Mode 5 Summary</BitsName>
<BitsPresence>1</BitsPresence>
</Bits>
<Bits bit="7">
<BitsShortName>PMN</BitsShortName>
<BitsName>Mode 5 PIN NO Mission Code</BitsName>
<BitsPresence>2</BitsPresence>
</Bits>
<Bits bit="6">
<BitsShortName>POS</BitsShortName>
<BitsName>Mode 5 required position</BitsName>
<BitsPresence>3</BitsPresence>
</Bits>
<Bits bit="5">
<BitsShortName>GA</BitsShortName>
<BitsName>Mode 5 GNSSderived Altitude</BitsName>
<BitsPresence>4</BitsPresence>
</Bits>
<Bits bit="4">
<BitsShortName>EM1</BitsShortName>
<BitsName>Extended Mode 1 in octal representation</BitsName>
<BitsPresence>5</BitsPresence>
</Bits>
<Bits bit="3">
<BitsShortName>TOS</BitsShortName>
<BitsName>Time offset for POS and GA</BitsName>
<BitsPresence>6</BitsPresence>
</Bits>
<Bits bit="2">
<BitsShortName>XP</BitsShortName>
<BitsName>X-Pulse Present</BitsName>
<BitsPresence>7</BitsPresence>
</Bits>
<Bits bit="1" fx="1">
<BitsShortName>FX</BitsShortName>
<BitsName>Extension Indicator</BitsName>
<BitsConst>0</BitsConst>
</Bits>
</Fixed>
</Variable>
<Fixed length="1">
<Bits from="8" to="1">
<BitsShortName>test</BitsShortName>
<BitsName>SUM</BitsName>
</Bits>
</Fixed>
</Compound>
</Compound>
</Explicit>
</DataItemFormat>
</DataItem>
There seems to be a problem for the tool to decode reserved expansion fields that are composed using different layers of compound types.
I generated an example xml script that should decode the explicit RE data item, with a 'Field 1' as first bit of the first compound item and 'M5N' as the second bit of the first compound item. The rest is not used in the data.
In my ASTERIX data, I only have data with the 'M5N' bit set to 1. With this bit set, the code should jump to the last compound part of the xml below, which it does correctly (When I just read a 'fixed' variable with length 1 instead of interpreting the data as a compound - see commented part, I can see the FSPEC and first byte of data of this compound item, but whenever it is defined as 'compound', the code returns errors.
Is there a way to decode a RE field with this outlay:
Explicit
- Compound
- Compound
- Compound