Skip to content

Commit

Permalink
Issue #16 Issue with enforcement of fx=1
Browse files Browse the repository at this point in the history
  • Loading branch information
dsalantic committed Feb 17, 2016
1 parent 168bb54 commit 2b579fb
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 11 deletions.
3 changes: 2 additions & 1 deletion HISTORY
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,5 @@ Definition of CAT004 added
2.1.6
17.2.2016.
Issue #20 asterix_cat034_1_26.xml: Data item 050 SSR status: bit 4 read twice
Issue #19 Problem found in DataItemBits::getBits(.....)
Issue #19 Problem found in DataItemBits::getBits(.....)
Issue #16 Issue with enforcement of fx=1
8 changes: 1 addition & 7 deletions install/config/asterix_cat021_1_8.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1181,13 +1181,7 @@
</Bits>
</Fixed>
<Fixed length="1">
<Bits bit="8" fx="1">
<!-- This data item is a variant of the “Extended length data field” as described in ASTERIX part1. The LSB in the first extent is not used as FX-bit. -->
<BitsShortName>FX</BitsShortName>
<BitsName>Spare bits set to zero</BitsName>
<BitsConst>0</BitsConst>
</Bits>
<Bits from="7" to="5">
<Bits from="8" to="5">
<BitsShortName>spare</BitsShortName>
<BitsName>Spare bits set to zero</BitsName>
<BitsConst>0</BitsConst>
Expand Down
3 changes: 2 additions & 1 deletion src/asterix/DataItemFormatFixed.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ bool DataItemFormatFixed::isLastPart(const unsigned char* pData)
return true;
}
}
Tracer::Error("Missing fx bit in variable item!");
// If the fx bit is not found it means that this is last part.
// Tracer::Error("Missing fx bit in variable item!");
return true;
}

Expand Down
5 changes: 5 additions & 0 deletions src/asterix/XMLParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -797,6 +797,10 @@ void XMLParser::ElementHandlerEnd(void *data, const char *el)
{
if (p->m_pFormat != NULL && p->m_pFormat->isFixed())
{
/* We do not check for fx bit any more because there are some formats that
do not have fx bit in primary part of variable item (e.g. I021/271).
Now if the fx is not defined it means that this is the last primary field.
if (p->m_pFormat->m_pParentFormat && p->m_pFormat->m_pParentFormat->isVariable())
{ // check if fx bit is set
std::list<DataItemFormat*>::iterator it;
Expand All @@ -815,6 +819,7 @@ void XMLParser::ElementHandlerEnd(void *data, const char *el)
p->Error("Missing fx=1 in primary part of Variable item.");
}
}
*/
p->m_pFormat = p->m_pFormat->m_pParentFormat;
}
else
Expand Down
4 changes: 2 additions & 2 deletions src/main/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#ifndef VERSION_H
#define VERSION_H

#define _VERSION 2.1.5
#define _VERSION_STR "2.1.5"
#define _VERSION 2.1.6
#define _VERSION_STR "2.1.6"

#endif

0 comments on commit 2b579fb

Please sign in to comment.