1. Dalen Kruse
  2. Asterix Inspector

Commits

Dalen Kruse  committed 8792f57 Merge

Merged devel branch with root.

  • Participants
  • Parent commits 773804f, 3fb7162
  • Branches default

Comments (0)

Files changed (27)

File Changelog

View file
+AsterixInspector 0.6.1
+----------------------
+* Cursor position in statusbar
+* Minor fixes
+
+
+AsterixInspector 0.6.0
+----------------------
+* There's a Changelog now
+* Added Cat48
+* Selection of arbitrary descode position in hex view.
+  This helps working with corrupt data.
+* Not-present fields in item of format 'variable' suppressed in data item
+  view

File LICENSE

View file
+Copyright (c) 2010, Volker Poplawski. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+  * Redistributions of source code must retain the above copyright
+    notice, this list of conditions and the following
+    disclaimer.
+  * Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in the
+    documentation and/or other materials provided with the
+    distribution.
+  * Neither the name of the copyright holder nor the 
+    names of its contributors may be used to endorse or promote products
+    derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

File README

View file
+
+
+AsterixInspector 
+
+displays contents of files in Eurocontrol Asterix format. 
+Asterix is a binary data format standard for data exchange in aviation.
+
+
+Author: Volker Poplawski (volker@openbios.org)
+
+
+BUILDING FROM SOURCE
+
+This requires a working Qt 4.6 or greater environment
+
+Run
+	qmake
+
+than run
+	make
+
+

File asterix.cpp

View file
+/*
+ * This application is free software and is released under the terms of
+ * the BSD license. See LICENSE file for details.
+ *
+ * Copyright (c) 2010 Volker Poplawski (volker@openbios.org)
+ */
+
+#include "asterix.h"
+
+
+
+
+AsterixBlock::AsterixBlock(const uchar* data, const Uap& uap) :
+    m_data(data)
+{
+  if (not uap.m_categories.contains( category() ))
+  {
+    qDebug() << "Cat" << category() << "is undefined";
+    return;  // undefined cat
+  }
+
+  const UapCategory* uapCat = uap.m_categories[category()];
+
+  const uchar* p = m_data + 3;
+
+  int recordIndex = 0;
+  while (p < m_data + length())
+  {
+    AsterixRecord record(p, recordIndex++, uapCat);
+
+    if (record.length() == -1)
+    {
+      qDebug() << "invalid record";
+      return;
+    }
+
+    m_records.append(record);
+    p += record.length();
+  }
+}
+
+
+/** count number of extended octeds at p
+ **/
+int AsterixBlock::countExtends(const uchar *p)
+{
+  const uchar* ep = p;
+  while (*ep & 0x1)
+    ep++;
+
+  return ep - p;
+}
+
+
+// extracts field-reference-numbers (FRNs) from FSPEC (multi)byte section
+QList<int> AsterixBlock::decodeFspecSection(const uchar *p, int size)
+{
+  QList<int> ret;
+
+  for (int fspecIdx = 0; fspecIdx < size; fspecIdx++)  // iterate over fspec bytes
+  {
+    for (int b = 7; b > 0; b--)  // iterate over bits from left/msb to right/lsb of fspec byte
+    {
+      if (BITTEST((p[fspecIdx]), b))
+      {
+        // bit at position b is set. this yields a FRN
+        int frn = (fspecIdx * 7) + (8-b);
+        ret.append(frn);
+      }
+    }
+  }
+
+ return ret;
+}
+
+
+AsterixRecord::AsterixRecord(const uchar *data, int blockIndex, const UapCategory* uapCat) :
+  m_data(data),
+  m_index(blockIndex)
+{
+  int numFspec = 1 + AsterixBlock::countExtends(m_data);   // get number of fspec bytes
+  QList<int> frns = AsterixBlock::decodeFspecSection(m_data, numFspec);
+
+  const uchar* dataItemPtr = data + numFspec;
+
+  foreach (int frn, frns)
+  {
+    if (not uapCat->m_dataItems.contains(frn))
+    {
+      qDebug() << "FRN" << frn << "is undefined";
+      m_length = -1;       // mark this record as invalid
+      return; // undefined frn
+    }
+
+    const UapDataItem* uapItem = uapCat->m_dataItems[frn];
+
+    AsterixDataItem dataItem(dataItemPtr, uapItem);
+    m_fields.append(dataItem);
+
+    dataItemPtr += dataItem.length();  // advance to start of next dataitem
+  }
+  m_length = dataItemPtr - m_data;
+}
+
+
+AsterixDataItem::AsterixDataItem(const uchar *data, const UapDataItem *uapDataItem) :
+    m_data(data),
+    m_uapDataItem(uapDataItem)
+{
+  if (m_uapDataItem->format() == UapDataItem::COMPOUND)
+  {
+    int numFspec = 1 + AsterixBlock::countExtends(m_data);   // get number of fspec bytes
+    QList<int> frns = AsterixBlock::decodeFspecSection(m_data, numFspec);
+
+    const uchar* dataItemPtr = m_data + numFspec;
+
+    foreach (int frn, frns)
+    {
+      if (not uapDataItem->m_subFields.contains(frn))
+      {
+        qDebug() << "Subfield FRN" << frn << "is undefined";
+        m_length = -1;       // mark this record as invalid
+        return; // undefined frn
+      }
+
+      const UapDataItem* uapItem = uapDataItem->m_subFields[frn];
+
+      AsterixDataItem dataItem(dataItemPtr, uapItem);
+      m_subfields.append(dataItem);
+
+      dataItemPtr += dataItem.length();  // advance to start of next dataitem
+    }
+    m_length = dataItemPtr - m_data;
+  }
+  else
+  {
+    m_length = uapDataItem->calcLength(m_data);
+  }
+}
+
+
+/** decode a character from ICAO 6bit presentation to ascii/QChar
+ **/
+QChar AsterixDataItem::decodeIcaoSixBitChar(int c)
+{
+  c &= BITMASK(5);
+  if (c >= 1 && c <= 26)       // 1..26 => 'A'..'Z'
+  {
+    return 'A' + c-1;
+  }
+  else if (c == 32)            // 32 => space
+  {
+    return ' ';
+  }
+  else if (c >= 48 && c <= 57) // 48..57 => '0'..'9'
+  {
+    return '0' + c-48;
+  }
+  else
+  {
+    return QChar::ReplacementCharacter;
+  }
+}
+
+
+/** decode ICAO 6bit 8 character string located in 6 bytes at 'p'
+ **/
+QString AsterixDataItem::decodeIcaoStr(const uchar* p)
+{
+  QByteArray buffer(8, 0);  // a buffer of 8 bytes, set to 0
+  buffer.replace(2, 6, (const char*)p);  // align *p to end of buffer
+
+  quint64 s = qFromBigEndian<quint64>((const uchar*)buffer.constData()); // and convert buffer into 64bit maschine word
+
+  QString ret;
+  for (int b = 42; b >= 0; b -= 6)     // first char at bit pos 42, second at 36 ... last at 0
+  {
+    ret += decodeIcaoSixBitChar(s >> b);
+  }
+
+  return ret;
+}
+
+
+/** Extract arbitrary bitfield (i.e. memory section on bit precision).
+ ** Extract from multiple octeds starting at 'o' (counting from 1) and length l
+ ** with bit index 0 at o+l.
+ ** Resulting Bytearray is right-justified and 0-padded on left side.
+ **/
+QByteArray AsterixDataItem::bitfield(int o, int l, int msb, int lsb) const
+{
+  QByteArray ret;
+  int lByte = o-1 + l-1 - lsb/8;   // offset of least sig byte
+  int mByte = o-1 + l-1 - msb/8;   // offset of most sig byte
+
+  if (mByte == lByte)
+  {
+    ret.append( BF8(mByte, msb % 8, lsb % 8) );
+    return ret;
+  }
+
+  if (mByte + 1 == lByte)
+  {
+    ret.append( (BF16(mByte, msb % 16, lsb % 16) & 0xff00) >> 8);
+    ret.append( (BF16(mByte, msb % 16, lsb % 16) & 0x00ff) >> 0);
+    return ret;
+  }
+
+  ret.resize(lByte - mByte + 1);
+
+  // it holds: mbyte+2 < lbyte
+  for (int i = lByte; i >= mByte+2; i--)
+  {
+    ret[i-mByte] = m_data[i-1] << (8-(lsb%8)) | m_data[i] >> (lsb%8);
+  }
+
+  ret[0] = (BF16(mByte, msb - ((lByte-mByte-1)*8), 0) & 0xff00) >> 8;
+  ret[1] = (BF16(mByte, msb - ((lByte-mByte-1)*8), 0) & 0x00ff) >> 0;
+
+  return ret;
+}

File asterix.h

View file
+/*
+ * This application is free software and is released under the terms of
+ * the BSD license. See LICENSE file for details.
+ *
+ * Copyright (c) 2010 Volker Poplawski (volker@openbios.org)
+ */
+
+#ifndef ASTERIX_H
+#define ASTERIX_H
+
+#include <QtCore>
+
+
+// generate mask for lowest/lsb 'n' (counting from 0) bits. E.g. BITMASK(6) => 0x3f
+#define BITMASK(n) ((1<<(n+1))-1)
+
+// test if the 'n'th. lowest/lsb is set
+#define BITTEST(v,n) ((v) & (1 << (n)))
+
+
+class AsterixRecord;
+class AsterixDataItem;
+
+#include "uap.h"
+
+
+enum AsterixCategory
+{
+  UNDEFINED    = 0,
+  ASTERIXCAT1  = 1,
+  ASTERIXCAT2  = 2,
+  ASTERIXCAT8  = 8,
+  ASTERIXCAT10 = 10,
+  ASTERIXCAT34 = 34,
+  ASTERIXCAT48 = 48,
+  ASTERIXCAT62 = 62
+};
+
+
+
+class AsterixBlock
+{
+  public:
+    AsterixBlock(const uchar* data, const Uap& uap);
+
+    const uchar* data() const { return m_data; }
+    quint8 category() const { return *(quint8*)(m_data + 0); }
+    quint16 length() const { return qFromBigEndian<quint16>(m_data + 1); }
+
+    int numRecords() const { return m_records.count(); }
+    const AsterixRecord& record(int index) const { return m_records[index]; }
+
+    static int countExtends(const uchar* p);
+    static QList<int> decodeFspecSection(const uchar* p, int size);
+
+  protected:
+    const uchar*         m_data;
+    QList<AsterixRecord> m_records;
+};
+
+
+class AsterixRecord
+{
+  public:
+    AsterixRecord(const uchar* data, int blockIndex, const UapCategory* uapCat);
+
+    const uchar* data() const { return m_data; }
+    int length() const { return m_length; }
+    int numFields() const { return m_fields.count(); }
+    const AsterixDataItem& field(int index) const { return m_fields[index]; }
+
+  protected:
+    QList<int> decodeFspecSection() const;
+
+    const uchar*            m_data;
+    int                     m_index;   // record-index in block
+    int                     m_length;
+    QList<AsterixDataItem>  m_fields;
+};
+
+
+class AsterixDataItem
+{
+  public:
+    AsterixDataItem(const uchar* data, const UapDataItem* uapDataItem);
+    const UapDataItem* uapDataItem() const { return m_uapDataItem; }
+
+    const uchar* data() const { return m_data; }
+    int length() const { return m_length; }
+
+    int numSubfields() const { return m_subfields.count(); }
+    const AsterixDataItem& subField(int index) const { return m_subfields[index]; }
+
+    QByteArray bitfield(int o, int l, int msb, int lsb) const;
+
+    static QChar decodeIcaoSixBitChar(int c);
+    static QString decodeIcaoStr(const uchar* p);
+
+  protected:
+    int numExtends() const { return AsterixBlock::countExtends(m_data); }
+
+    // get u8/u16/u32 at octed offset 'ofs' without alignment&endian constraints
+    quint8  getU8(int ofs) const { return *reinterpret_cast<const quint8*>(m_data + ofs); }
+    quint16 getU16(int ofs) const { return qFromBigEndian<quint16>(m_data + ofs); }
+    quint32 getU24(int ofs) const { return 0 | getU8(ofs) << 16 | getU16(ofs+1); }
+    quint32 getU32(int ofs) const { return qFromBigEndian<quint32>(m_data + ofs); }
+
+    // extract bifield from octed index 'o', with msb at 'm' and lsb at 'l'
+    // 'm' and 'l' are inclusive and count from 0.
+    int BF8(int o, int m, int l) const { return (getU8(o) >> l) & BITMASK(m-l); }
+    int BF16(int o, int m, int l) const { return (getU16(o) >> l) & BITMASK(m-l); }
+
+    const uchar*             m_data;
+    int                      m_length;
+    const UapDataItem*       m_uapDataItem;
+    QList<AsterixDataItem>   m_subfields;    // if this is a compound item, otherwise empty
+};
+
+
+
+
+
+
+#endif // ASTERIX_H
+

File asterixFileMapper.cpp

View file
+#include "asterixFileMapper.h"
+
+
+AsterixFileMapper::AsterixFileMapper(QIODevice* file, QObject *parent) :
+    QThread(parent),
+    m_file(file),
+    m_offset(0)
+{
+  m_reachedEnd = false;
+  qRegisterMetaType<QList<AsterixBlockInfo> >();
+}
+
+
+void AsterixFileMapper::run()
+{
+  qint64 blockCount = 0;
+  m_stopRequested = false;
+  m_file->seek(m_offset);
+
+  while (m_reachedEnd == false && m_stopRequested == false)
+  {
+    QList<AsterixBlockInfo> ret;
+
+    QTime time;
+    time.start();
+
+    do {
+      if (m_file->atEnd())
+      {
+        m_reachedEnd = true;
+        break;
+      }
+
+      m_file->seek(m_offset);
+      qint64 offset = m_file->pos();
+
+      quint8 category;
+      if (not m_file->read((char*)&category, 1))
+        break;
+
+      char sbuffer[2];
+      if (not m_file->read(sbuffer, 2))
+        break;
+
+      quint16 blockSize = qFromBigEndian<quint16>((uchar*)sbuffer);
+
+      if (blockSize >= 3                        // invalid blocksize
+          &&                                    // and
+          offset + blockSize <= m_file->size() ) // block not truncated?
+      {
+        // yes
+        AsterixBlockInfo block = { offset, category, blockSize };
+        ret << block;
+      }
+      else
+      {
+        m_reachedEnd = true;
+        break;
+      }
+
+      m_offset += blockSize;
+      blockCount++;
+
+    } while (time.elapsed() < 100);
+
+    emit asterixBlock(ret);
+    emit bytesScanned(m_offset);
+    emit blocksScanned(blockCount);
+    msleep(50);
+  }
+}
+
+

File asterixFileMapper.h

View file
+/*
+ * This application is free software and is released under the terms of
+ * the BSD license. See LICENSE file for details.
+ *
+ * Copyright (c) 2010 Volker Poplawski (volker@openbios.org)
+ */
+
+#ifndef ASTERIXFILEMAPPER_H
+#define ASTERIXFILEMAPPER_H
+
+#include <QtCore>
+
+
+class AsterixBlockInfo
+{
+  public:
+    qint64    offset;
+    qint16    category;
+    quint16   size;
+};
+
+Q_DECLARE_METATYPE(AsterixBlockInfo);
+Q_DECLARE_METATYPE(QList<AsterixBlockInfo>);
+
+class AsterixFileMapper : public QThread
+{
+    Q_OBJECT
+public:
+    explicit AsterixFileMapper(QIODevice* file, QObject *parent = 0);
+
+    bool reachedEnd() const { return m_reachedEnd; }
+
+  signals:
+    void asterixBlock(const QList<AsterixBlockInfo>& block);
+    void bytesScanned(qint64 pos);
+    void blocksScanned(qint64 pos);
+
+  public slots:
+    void stop() { m_stopRequested = true; }
+    void setOffset(qint64 ofs) { m_offset = ofs; }
+
+
+  protected:
+    virtual void run();
+
+    QIODevice* m_file;
+    quint64    m_offset;
+    bool       m_reachedEnd;
+    bool       m_stopRequested;
+};
+
+#endif // ASTERIXFILEMAPPER_H

File asterixInspector.desktop

View file
+[Desktop Entry]
+Name=asterixInspector
+GenericName=A viever for Eurocontrol Asterix files
+Categories=Development;
+Exec=asterixInspector
+Icon=asterixInspector
+Terminal=false
+Type=Application
+StartupNotify=true

File asterixInspector.pro

View file
+#-------------------------------------------------
+#
+# Project created by QtCreator 2010-10-24T17:35:52
+#
+#-------------------------------------------------
+
+QT       += core gui xml
+
+TARGET = asterixInspector
+TEMPLATE = app
+
+
+SOURCES += main.cpp\
+        mainWindow.cpp \
+    asterix.cpp \
+    asterixFileMapper.cpp \
+    asterixModel.cpp \
+    hexedit.cpp \
+    global.cpp \
+    uap.cpp \
+    dataItemWidget.cpp
+
+HEADERS  += mainWindow.h \
+    asterix.h \
+    asterixFileMapper.h \
+    asterixModel.h \
+    hexedit.h \
+    global.h \
+    uap.h \
+    dataItemWidget.h
+
+FORMS    += mainWindow.ui
+
+RESOURCES += \
+    resources.qrc

File asterixInspector.spec

View file
+# norootforbuild
+
+Name:           asterixInspector
+Version:        0.6.0
+Release:        1
+Summary:        A viever for Eurocontrol Asterix files
+
+Group:          Productivity/File utilities
+License:        BSD
+URL:            http://asterix.sourceforge.net/
+Source0:        %{name}-0.6.0.tar.bz2   
+BuildRoot:      %{_tmppath}/%{name}-%{version}-build
+
+BuildRequires:  libqt4-devel
+#Requires:       
+
+%description
+AsterixInspector - displays contents of files which are in Eurocontrol Asterix format.
+Asterix is a binary data exchange format in aviation, standardized by Eurocontrol.
+
+%prep
+%setup -q -n %{name}-0.6.0
+
+
+%build
+qmake
+%__make %{?_smp_mflags}
+
+
+%install
+%__install -dm 755 %{buildroot}%{_bindir}
+%__install -m 755 %{name} %{buildroot}%{_bindir}
+%__install -m 755 images/radar.svg %{buildroot}%{_datadir}icons/{%name}.svg
+%__install -m 755 {name}.desktop %{_datadir}/applications/
+
+%suse_update_desktop_file %{name} Utility FileTools Qt
+
+%clean
+%__rm -rf %{buildroot}
+
+%files
+%defattr(-,root,root,-)
+%{_bindir}/*
+%{_datadir}icons/{%name}.svg
+
+%doc
+
+
+%changelog

File asterixModel.cpp

View file
+/*
+ * This application is free software and is released under the terms of
+ * the BSD license. See LICENSE file for details.
+ *
+ * Copyright (c) 2010 Volker Poplawski (volker@openbios.org)
+ */
+
+#include "asterixModel.h"
+
+#include "global.h"
+#include "asterixFileMapper.h"
+
+
+AsterixModel::AsterixModel(QObject *parent) :
+    QAbstractItemModel(parent)
+{
+  m_blocksExposed = 0;
+  m_blockInsertPos = 0;
+}
+
+
+void AsterixModel::asterixBlock(const QList<AsterixBlockInfo>& blocks)
+{
+  beginInsertRows( QModelIndex(), m_blockInsertPos, m_blockInsertPos + blocks.count() - 1);
+  foreach (const AsterixBlockInfo& block, blocks)
+  {
+    if (m_blockInsertPos >= m_blocks.size())
+    {
+      m_blocks.resize(m_blocks.size() + m_blocks.size()/2);
+    }
+    m_blocks[m_blockInsertPos++] = block;
+  }
+  endInsertRows();
+}
+
+
+//bool AsterixModel::canFetchMore(const QModelIndex &parent) const
+//{
+//  if (parent.isValid())
+//  {
+//    return false;
+//  }
+//  else
+//  {
+//    return m_blocksExposed < m_blocks.size();
+//  }
+//}
+
+
+//void AsterixModel::fetchMore(const QModelIndex &parent)
+//{
+//  if (not parent.isValid())
+//  {
+//    int numFetch = qMin(m_blocks.count() - m_blocksExposed, fetchIncrement);
+//    if (numFetch > 0)
+//    {
+//      beginInsertRows( QModelIndex(), m_blocksExposed, m_blocksExposed + numFetch - 1);
+//      m_blocksExposed += numFetch;
+//      endInsertRows();
+//    }
+//  }
+//}
+
+
+void AsterixModel::blocksScanned(qint64 blockNum)
+{
+  g_blockCountLabel->setText( QString("Blocks: %1").arg(blockNum) );
+}
+
+
+QVariant AsterixModel::headerData(int section, Qt::Orientation orientation, int role) const
+{
+  static QString headers[] = { "Block Offset", "Length", "Category" };
+
+  if (orientation == Qt::Horizontal && role == Qt::DisplayRole)
+    return headers[section];
+  else
+    return QAbstractItemModel::headerData(section, orientation, role);
+}
+
+
+QModelIndex AsterixModel::index(int row, int column, const QModelIndex &parent) const
+{
+  return createIndex(row, column, row);
+
+}
+
+
+QVariant AsterixModel::data(const QModelIndex &index, int role) const
+{
+  switch (role)
+  {
+  case Qt::DisplayRole:
+    {
+      switch (index.column())
+      {
+      case 0:
+        return QString("0x%1").arg(m_blocks[index.row()].offset, 0, 16);
+        break;
+
+      case 1:
+        return m_blocks[index.row()].size;
+        break;
+
+      case 2:
+        return m_blocks[index.row()].category;
+        break;
+      }
+    }
+
+  default:
+    return QVariant();
+  }
+
+}
+
+
+int AsterixModel::rowCount(const QModelIndex &parent) const
+{
+  if (parent.isValid())
+  {
+    return 0;
+  }
+  else
+  {
+    return m_blockInsertPos;
+  }
+}
+
+
+const AsterixBlockInfo& AsterixModel::blockInfo(const QModelIndex &index) const
+{
+  Q_ASSERT(index.isValid());
+  Q_ASSERT(index.row() < m_blocks.count());
+
+  return m_blocks[index.row()];
+}
+
+
+AsterixBlockModel::AsterixBlockModel(const uchar* base, const AsterixBlock& block, QObject *parent) :
+    QAbstractItemModel(parent),
+    m_base(base),
+    m_asterixBlock(block)
+{
+}
+
+
+QVariant AsterixBlockModel::headerData(int section, Qt::Orientation orientation, int role) const
+{
+  static QString headers[] = { "Record Offset", "Length", "#Fields" };
+
+  if (orientation == Qt::Horizontal && role == Qt::DisplayRole)
+    return headers[section];
+  else
+    return QAbstractItemModel::headerData(section, orientation, role);
+}
+
+
+QModelIndex AsterixBlockModel::index(int row, int column, const QModelIndex &parent) const
+{
+  return createIndex(row, column, row);
+
+}
+
+
+int AsterixBlockModel::rowCount(const QModelIndex &parent) const
+{
+  if (parent.isValid())
+  {
+    return 0;
+  }
+  else
+  {
+    return m_asterixBlock.numRecords();
+  }
+}
+
+
+QVariant AsterixBlockModel::data(const QModelIndex &index, int role) const
+{
+  if (not index.isValid() || index.row() >= m_asterixBlock.numRecords())
+    return QVariant();
+
+  switch (role)
+  {
+  case Qt::DisplayRole:
+    {
+      switch (index.column())
+      {
+      case 0:
+        return QString("0x%1").arg(m_asterixBlock.record(index.row()).data() - m_base, 0, 16);
+        break;
+
+      case 1:
+        return m_asterixBlock.record(index.row()).length();
+        break;
+
+      case 2:
+        return m_asterixBlock.record(index.row()).numFields();
+        break;
+      }
+    }
+
+  default:
+    return QVariant();
+  }
+}
+
+
+
+
+
+
+
+
+AsterixRecordModel::AsterixRecordModel(const uchar* base, const AsterixRecord& record, QObject *parent) :
+    QAbstractItemModel(parent),
+    m_base(base),
+    m_asterixRecord(record)
+{
+  buildRowHeaders();
+}
+
+
+QVariant AsterixRecordModel::headerData(int section, Qt::Orientation orientation, int role) const
+{
+  static const QString headers[] = { "Item Offset", "Length", "FRN", "Field Type", "Description" };
+
+  if (orientation == Qt::Horizontal && role == Qt::DisplayRole)
+    return headers[section];
+  else if (orientation == Qt::Vertical && role == Qt::DisplayRole)
+    return m_rowHeaders[section];
+  else
+    return QAbstractItemModel::headerData(section, orientation, role);
+}
+
+
+QModelIndex AsterixRecordModel::index(int row, int column, const QModelIndex &parent) const
+{
+  return createIndex(row, column, row);
+}
+
+
+int AsterixRecordModel::rowCount(const QModelIndex &parent) const
+{
+  if (parent.isValid())
+  {
+    return 0;
+  }
+  else
+  {
+    return m_rowHeaders.count();
+  }
+}
+
+
+const AsterixDataItem& AsterixRecordModel::dataItemAtRow( int r ) const
+{
+  const int dataItemI = m_rowHeaders[r].left( m_rowHeaders[r].indexOf('#') ).toInt() - 1;
+
+  if (m_rowHeaders[r].contains('#'))
+  {
+    int subfieldIndex = m_rowHeaders[r].mid( m_rowHeaders[r].indexOf('#') + 1 ).toInt() - 1;
+    return m_asterixRecord.field(dataItemI).subField(subfieldIndex);
+  }
+  else
+  {
+    return m_asterixRecord.field(dataItemI);
+  }
+}
+
+
+QVariant AsterixRecordModel::data(const QModelIndex &index, int role) const
+{
+  if (not index.isValid() || index.row() >= m_rowHeaders.count())
+    return QVariant();
+
+  const int r = m_rowHeaders[index.row()].left( m_rowHeaders[index.row()].indexOf('#') ).toInt() - 1;
+
+  switch (role)
+  {
+  case Qt::DisplayRole:
+    {
+      switch (index.column())
+      {
+      case 0:
+      {
+        const AsterixDataItem& dataItem = dataItemAtRow( index.row() );
+        return QString("0x%1").arg(dataItem.data() - m_base, 0, 16);
+        break;
+      }
+
+      case 1:
+      {
+        const AsterixDataItem& dataItem = dataItemAtRow( index.row() );
+        return dataItem.length();
+        break;
+      }
+
+      case 2:
+      {
+        const AsterixDataItem& dataItem = dataItemAtRow( index.row() );
+        const UapDataItem& uapItem = *dataItem.uapDataItem();
+        return uapItem.frn();
+      }
+        break;
+
+      case 3:
+      {
+        const AsterixDataItem& dataItem = dataItemAtRow( index.row() );
+        const UapDataItem& uapItem = *dataItem.uapDataItem();
+        return uapItem.id();
+      }
+        break;
+
+      case 4:
+      {
+        const AsterixDataItem& dataItem = dataItemAtRow( index.row() );
+        const UapDataItem& uapItem = *dataItem.uapDataItem();
+        return uapItem.name();
+        break;
+      }
+    }
+    }
+
+  default:
+    return QVariant();
+  }
+}
+
+
+void AsterixRecordModel::buildRowHeaders()
+{
+  for (int i = 0; i < m_asterixRecord.numFields(); i++)
+  {
+    m_rowHeaders << QString::number(i+1);
+    for (int si = 0; si < m_asterixRecord.field(i).numSubfields(); si++)
+    {
+      m_rowHeaders << QString::number(i+1) + "#" + QString::number(si+1);
+    }
+  }
+}
+

File asterixModel.h

View file
+/*
+ * This application is free software and is released under the terms of
+ * the BSD license. See LICENSE file for details.
+ *
+ * Copyright (c) 2010 Volker Poplawski (volker@openbios.org)
+ */
+
+#ifndef ASTERIXMODEL_H
+#define ASTERIXMODEL_H
+
+#include <QtGui>
+
+#include "asterixFileMapper.h"
+#include "asterix.h"
+
+class AsterixModel : public QAbstractItemModel
+{
+    Q_OBJECT
+  public:
+    explicit AsterixModel(QObject *parent = 0);
+
+    int columnCount(const QModelIndex&) const { return 3; }
+    QVariant headerData ( int section, Qt::Orientation orientation, int role = Qt::DisplayRole ) const;
+    QModelIndex index( int row, int column = 0, const QModelIndex& parent = QModelIndex() ) const;
+    int rowCount(const QModelIndex& parent) const;
+    QVariant data( const QModelIndex& index, int role = Qt::DisplayRole ) const;
+    QModelIndex parent( const QModelIndex&) const { return QModelIndex(); }
+
+    // bool canFetchMore(const QModelIndex &parent) const;
+    // void fetchMore(const QModelIndex &parent);
+
+    const AsterixBlockInfo& blockInfo(const QModelIndex& index) const;
+  signals:
+
+  public slots:
+    void reserve(qint64 blocks) { m_blocks.resize(blocks); }
+    void sequeeze() { m_blocks.squeeze(); }
+    void asterixBlock(const QList<AsterixBlockInfo>& block);
+    void blocksScanned(qint64 blockNum);
+
+  protected:
+    QVector<AsterixBlockInfo>  m_blocks;
+    int                        m_blockInsertPos;
+    int                        m_blocksExposed;
+
+    QFile                    m_file;
+};
+
+
+class AsterixBlockModel : public QAbstractItemModel
+{
+  Q_OBJECT
+  public:
+    explicit AsterixBlockModel(const uchar* base, const AsterixBlock& block, QObject *parent = 0);
+
+    int columnCount(const QModelIndex&) const { return 3; }
+    QVariant headerData ( int section, Qt::Orientation orientation, int role = Qt::DisplayRole ) const;
+    QModelIndex index( int row, int column = 0, const QModelIndex& parent = QModelIndex() ) const;
+    int rowCount(const QModelIndex& parent) const;
+    QVariant data( const QModelIndex& index, int role = Qt::DisplayRole ) const;
+    QModelIndex parent( const QModelIndex&) const { return QModelIndex(); }
+
+  protected:
+    const uchar* m_base;
+    const AsterixBlock& m_asterixBlock;
+};
+
+
+class AsterixRecordModel : public QAbstractItemModel
+{
+  Q_OBJECT
+  public:
+    explicit AsterixRecordModel(const uchar* base, const AsterixRecord& record, QObject *parent = 0);
+
+    int columnCount(const QModelIndex&) const { return 5; }
+    QVariant headerData ( int section, Qt::Orientation orientation, int role = Qt::DisplayRole ) const;
+    QModelIndex index( int row, int column = 0, const QModelIndex& parent = QModelIndex() ) const;
+    int rowCount(const QModelIndex& parent) const;
+    QVariant data( const QModelIndex& index, int role = Qt::DisplayRole ) const;
+    QModelIndex parent( const QModelIndex&) const { return QModelIndex(); }
+
+    const AsterixDataItem& dataItemAtRow( int r ) const;
+
+  protected:
+    void buildRowHeaders();
+
+    const uchar* m_base;
+    const AsterixRecord& m_asterixRecord;
+
+    QStringList m_rowHeaders;
+};
+
+
+#endif // ASTERIXMODEL_H

File asterix_specification.xml

View file
+<asterix>
+
+<!--
+  Part 2a
+  Transmission of
+  Monoradar Data
+  Target Reports
+
+  Edition: 1.1
+  Edition Date: August 2002
+
+
+  NOTE: Only UAP for tracks (not plots) is implemented
+  
+-->
+
+<category cat="1">
+
+  <dataitem frn="1" id="I001/010" format="fixed" length="2">
+    <name>Data Source Identifier</name>
+    <definition>Identification of the radar station from which the data are received.</definition>
+    <field octed="1" msb="16" lsb="9">
+      <name>SAC</name>
+      <desc>System Area Code</desc>
+    </field>
+    <field octed="1" msb="8" lsb="1">
+      <name>SIC</name>
+      <desc>System Identification Code</desc>
+    </field>
+    <desc>
+      <b>NOTES</b><br/>
+      1. The defined SACs are listed in Part 1, Table 2 [Ref. 2]<br/>
+      2. The defined SICs are listed in Part 1, Annex B [Ref. 2]<br/>
+    </desc>
+  </dataitem>
+
+  <dataitem frn="2" id="I001/020" format="variable" length="1">
+    <name>Target Report Descriptor</name>
+    <definition>Type and characteristics of the radar data as transmitted by a radar station.</definition>
+    <field octed="1" msb="8" lsb="8">
+      <name>TYP</name>
+      <enum value="0">Plot</enum>
+      <enum value="1">Track</enum>
+    </field>
+    <field octed="1" msb="7" lsb="7">
+      <name>SIM</name>
+      <desc>used to identify a simulated target report as produced by a traffic simulator.</desc>
+      <enum value="0">Actual plot or track</enum>
+      <enum value="1">Simulated plot or track</enum>
+    </field>
+    <field octed="1" msb="6" lsb="5">
+      <name>SSR/PSR</name>
+      <desc>Radar detection in last antenna scan</desc>
+      <enum value="0">No detection</enum>
+      <enum value="1">Sole primary detection</enum>
+      <enum value="2">Sole secondary detection</enum>
+      <enum value="2">Combined primary and secondary detection</enum>
+    </field>
+    <field octed="1" msb="4" lsb="4">
+      <name>ANT</name>
+      <enum value="0">Target report from antenna 1</enum>
+      <enum value="1">Target report from antenna 2</enum>
+    </field>
+    <field octed="1" msb="3" lsb="3">
+      <name>SPI</name>
+      <enum value="0">Default</enum>
+      <enum value="1">Special Position Identification</enum>
+    </field>
+    <field octed="1" msb="2" lsb="2">
+      <name>RAB</name>
+      <enum value="0">Default</enum>
+      <enum value="1">Plot or track from a fixed transponder</enum>
+    </field>
+
+    <field octed="2" msb="8" lsb="8">
+      <name>TST</name>
+      <enum value="0">Default</enum>
+      <enum value="1">Test target indicator</enum>
+    </field>
+    <field octed="2" msb="7" lsb="6">
+      <name>DS1/DS2</name>
+      <enum value="0">Default</enum>
+      <enum value="1">Unlawful interference (code 7500)</enum>
+      <enum value="2">Radio-communication failure (code 7600)</enum>
+      <enum value="2">Emergency (code 7700)</enum>
+    </field>
+    <field octed="2" msb="5" lsb="5">
+      <name>ME</name>
+      <enum value="0">Default</enum>
+      <enum value="1">Military emergency</enum>
+    </field>
+    <field octed="2" msb="4" lsb="4">
+      <name>ME</name>
+      <enum value="0">Default</enum>
+      <enum value="1">Military identification</enum>
+    </field>
+    <field octed="1" msb="3" lsb="2">
+      <name>Spare</name>
+      <desc>Spare Bits set to zero</desc>
+      <mandatory value="0"></mandatory>
+    </field>
+  </dataitem>
+
+  <dataitem frn="19" id="I001/030" format="variable" length="1">
+    <name>Warning/Error Conditions</name>
+    <definition>Warning/error conditions detected by a radar station for the target report involved.</definition>
+    <field octed="1" msb="8" lsb="2">
+      <name>W/E Value</name>
+      <enum value="0">no warning nor error condition</enum>
+      <enum value="1">garbled reply</enum>
+      <enum value="2">reflection</enum>
+      <enum value="3">sidelobe reply</enum>
+      <enum value="4">split plot</enum>
+      <enum value="5">second time around reply</enum>
+      <enum value="6">angels</enum>
+      <enum value="7">terrestrial vehicles</enum>
+      <enum value="64">possible wrong code in Mode-3/A</enum>
+      <enum value="65">possible wrong altitude information, transmitted when the Code C credibility check fails together with the Mode-C code in binary notation</enum>
+      <enum value="66">possible phantom MSSR plot</enum>
+      <enum value="80">fixed PSR plot</enum>
+      <enum value="81">slow PSR plot</enum>
+      <enum value="82">low quality PSR plot</enum>
+    </field>
+    <desc><b>NOTES</b><br/>
+    1. Warning/error condition values 0-63 are reserved for common standard use, whereas the values 64-127 are application dependent.<br/>
+    2. The following set of common W/E values is defined:<br/>
+      -  W/E = 0, no warning nor error condition<br/>
+      -  W/E = 1, garbled reply<br/>
+      -  W/E = 2, reflection<br/>
+      -  W/E = 3, sidelobe reply;<br/>
+      -  W/E = 4, split plot;<br/>
+      -  W/E = 5, second time around reply;<br/>
+      -  W/E = 6, angels<br/>
+      -  W/E = 7, terrestrial vehicles.<br/>
+    3. The following set of applications dependent W/E values are reserved:<br/>
+      -  W/E = 64, possible wrong code in Mode-3/A;<br/>
+      -  W/E = 65, possible wrong altitude information, transmitted when the Code C credibility check fails together with the Mode-C code in binary notation;<br/>
+      -  W/E = 66 possible phantom MSSR plot;<br/>
+      -  W/E = 80 fixed PSR plot;<br/>
+      -  W/E = 81 slow PSR plot;<br/>
+      -  W/E = 82 low quality PSR plot.<br/>
+    </desc>
+  </dataitem>
+
+  <dataitem frn="4" id="I001/040" format="fixed" length="4">
+    <name>Measured Position in Polar Co-ordinates</name>
+    <description>Measured position of an aircraft in local polar co-ordinates.</description>
+    <field size="4" octed="1" msb="32" lsb="17">
+      <name>RHO</name>
+      <format>uint</format>
+      <desc>1/128 NM. Max. range = 512 NM</desc>
+    </field>
+    <field size="4" octed="1" msb="16" lsb="1">
+      <name>Theta</name>
+      <format>uint</format>
+      <desc>360°/(2^16), approx. 0.0055°</desc>
+    </field>
+    <desc><b>NOTES</b><br/>
+    When expressed in 16 bits, signed or unsigned azimuths have the same value.<br/>
+    </desc>
+  </dataitem>
+
+  <dataitem frn="5" id="I001/042" format="fixed" length="4">
+    <name>Position in Cartesian Co-ordinates</name>
+    <definition>Position of a target in Cartesian co-ordinates, in two’s complement form.</definition>
+    <field size="4" octed="1" msb="32" lsb="17">
+      <name>X-Component</name>
+      <format>int</format>
+      <desc>2^(-6+f) where f is the scaling factor applied, modifying the standard quantisation unit. Max. range = 2(9+f) NM</desc>
+    </field>
+    <field size="4" octed="1" msb="16" lsb="1">
+      <name>Y-Component</name>
+      <format>int</format>
+      <desc>2^(-6+f) Max. range = 2^(9+f) NM</desc>
+    </field>
+    <desc><b>NOTES</b><br/>
+    1. A default quantisation unit of 1/64 NM is obtained for a value of f = 0.<br/>
+    2. Negative values are expressed in 2's complement form, bit-32 and bit-16 shall be set to 0 for positive values and 1 for negative values.<br/>
+    </desc>
+  </dataitem>
+
+  <dataitem frn="15" id="I001/050" format="fixed" length="2">
+    <name>Mode-2 Code in Octal Representation</name>
+    <definition>Reply to Mode-2 interrogation.</definition>
+    <field octed="1" msb="16" lsb="16">
+      <name>V</name>
+      <enum value="0">Code validated</enum>
+      <enum value="1">Code not validated</enum>
+    </field>
+    <field octed="1" msb="15" lsb="15">
+      <name>G</name>
+      <enum value="0">Default</enum>
+      <enum value="1">Garbled code</enum>
+    </field>
+    <field octed="1" msb="14" lsb="14">
+      <name>L</name>
+      <enum value="0">Mode-2 code as derived from the reply of the transponder</enum>
+      <enum value="1">Smoothed Mode-2 code as provided by a local tracker</enum>
+    </field>
+    <field octed="1" msb="13" lsb="13">
+      <name>Spare</name>
+      <desc>Spare Bits set to zero</desc>
+      <mandatory value="0">
+      </mandatory>
+    </field>
+    <field octed="1" msb="12" lsb="1">
+      <name>Reply</name>
+      <format>octal</format>
+      <desc>Mode-2 code in octal representation</desc>
+    </field>
+    <desc>
+    <b>NOTES</b><br/>
+    1. Smoothed Mode-2 data (bit-14 set to one) is used when the plot
+       contains no Mode-2 code or the Mode-2 codes of the plot and track are different.<br/>
+    2. Bits-16/15 have no meaning in the case of a smoothed Mode-2 and are
+       set to 0 for a calculated track.<br/>
+    </desc>
+  </dataitem>
+
+  <dataitem frn="18" id="I001/060" format="fixed" length="2">
+    <name>Mode-2 Code Confidence Indicator</name>
+    <definition>Confidence level for each bit of a Mode-2 reply as provided by a monopulse SSR station.</definition>
+    <field octed="1" msb="16" lsb="13">
+      <name>Spare</name>
+      <desc>Spare Bits set to zero</desc>
+      <mandatory value="0">
+      </mandatory>
+    </field>
+    <field octed="1" msb="12" lsb="1">
+      <name>QXi</name>
+      <desc>= 0 High quality pulse Xi<br/>
+      = 1 Low quality pulse Xi</desc>
+    </field>
+    <desc><b>NOTES</b><br/>
+      This Data Item is only transmitted if at least one pulse is of low quality.<br/>
+    </desc>
+  </dataitem>
+
+  <dataitem frn="7" id="I001/070" format="fixed" length="2">
+    <name>Mode-3/A Code in Octal Representation</name>
+    <definition>Mode-3/A code converted into octal representation.</definition>
+    <field octed="1" msb="16" lsb="16">
+      <name>V</name>
+      <enum value="0">Code validated</enum>
+      <enum value="1">Code not validated</enum>
+    </field>
+    <field octed="1" msb="15" lsb="15">
+      <name>G</name>
+      <enum value="0">Default</enum>
+      <enum value="1">Garbled Mode</enum>
+    </field>
+    <field octed="1" msb="14" lsb="14">
+      <name>L</name>
+      <enum value="0">Mode-3/A code derived from the reply of the transponder</enum>
+      <enum value="1">Mode-3/A code not extracted during the last scan</enum>
+    </field>
+    <field octed="1" msb="13" lsb="13">
+      <name>Spare</name>
+      <desc>Spare Bits set to zero</desc>
+      <mandatory value="0">
+      </mandatory>
+    </field>
+    <field octed="1" msb="12" lsb="1">
+      <name>Reply</name>
+      <format>octal</format>
+      <desc>Mode-3/A reply in octal representation</desc>
+    </field>
+    <desc><b>NOTES</b><br/>
+    1. The detector signals a garbled code when at least two replies are
+       overlapping. Smoothed Mode-3/A data (bit-14 set to a one) are used in
+       the case of the absence of Mode-3/A code information in the plot, or in
+       the case of a difference between the plot and track Mode-3/A code
+       information.<br/>
+    2. Bits-16/15 have no meaning in the case of a smoothed Mode-3/A and are set to 0 for a calculated track.<br/>
+    </desc>
+  </dataitem>
+
+  <dataitem frn="16" id="I001/080" format="fixed" length="2">
+    <name>Mode-3/A Code Confidence Indicator</name>
+    <definition>Confidence level for each bit of a Mode-3/A reply as provided by a monopulse SSR station.</definition>
+    <field octed="1" msb="16" lsb="13">
+      <name>Spare</name>
+      <desc>Spare Bits set to zero</desc>
+      <mandatory value="0"></mandatory>
+    </field>
+    <field octed="1" msb="12" lsb="1">
+      <name>QXi</name>
+      <desc>= 0 High quality pulse Xi<br/>
+      = 1 Low quality pulse Xi</desc>
+    </field>
+    <desc><b>NOTES</b><br/>
+      This Data Item is only transmitted if at least one pulse is of low quality.<br/>
+    </desc>
+  </dataitem>
+
+  <dataitem frn="8" id="I001/090" format="fixed" length="2">
+    <name>Mode-C Code in Binary Representation</name>
+    <definition>Mode-C height converted into binary representation.</definition>
+    <field octed="1" msb="16" lsb="16">
+      <name>V</name>
+      <enum value="0">Code validated</enum>
+      <enum value="1">Code not validated</enum>
+    </field>
+    <field octed="1" msb="15" lsb="15">
+      <name>G</name>
+      <enum value="0">Default</enum>
+      <enum value="1">Garbled Mode</enum>
+    </field>
+    <field octed="1" msb="14" lsb="1">
+      <name>Flight Level</name>
+      <desc>LSB= 1/4 FL = 25ft</desc>
+      <format>int</format>
+    </field>
+    <desc><b>NOTES</b><br/>
+    1. The detector signals a garbled code when at least two replies are overlapping.<br/>
+    2. The maximum height which can be represented is 204 775 ft.
+       Practically the maximum valid value is 126 750 ft (refer to ICAO Annex 10).<br/>
+    3. Negative values are expressed in 2's complement form, bit-14 is set to 0
+       for positive values and 1 for negative values.<br/>
+    </desc>
+  </dataitem>
+
+  <dataitem frn="17" id="I001/100" format="fixed" length="4">
+    <name>Mode-C Code and Code Confidence Indicator</name>
+    <definition>Mode-C height in Gray notation as received from the transponder together with the confidence level for each reply bit as provided by a  monopulse SSR station.</definition>
+    <field octed="1" msb="32" lsb="32">
+      <name>V</name>
+      <enum value="0">Code validated</enum>
+      <enum value="1">Code not validated</enum>
+    </field>
+    <field octed="1" msb="31" lsb="31">
+      <name>G</name>
+      <enum value="0">Default</enum>
+      <enum value="1">Garbled code</enum>
+    </field>
+    <field octed="1" msb="30" lsb="29">
+      <name>Spare</name>
+      <desc>Spare Bits set to zero</desc>
+      <mandatory value="0"></mandatory>
+    </field>
+    <field octed="1" msb="28" lsb="17">
+      <name>Reply</name>
+      <desc>Mode-C reply in Gray notation</desc>
+    </field>
+    <field octed="1" msb="16" lsb="13">
+      <name>Spare</name>
+      <desc>Spare Bits set to zero</desc>
+      <mandatory value="0"></mandatory>
+    </field>
+    <field octed="1" msb="12" lsb="1">
+      <name>QXi</name>
+      <desc>= 0 High quality pulse Xi<br/>
+      = 1 Low quality pulse Xi
+      </desc>
+    </field>
+    <desc><b>NOTES</b><br/>
+    1. This Data Item is only transmitted if at least one pulse is of low quality.<br/>
+    2. The detector signals a garbled code when at least two replies are overlapping.<br/>
+    </desc>
+  </dataitem>
+
+  <dataitem frn="12" id="I001/120" format="fixed" length="1">
+    <name>Measured Radial Doppler Speed</name>
+    <definition>Radial component of the ground speed as measured by means of Doppler filter banks in radar signal processors.</definition>
+    <field octed="1" msb="8" lsb="1">
+      <format>int</format>
+      <desc>(LSB) = 2^(-14+f) NM/s.</desc>
+    </field>
+    <desc><b>NOTES</b><br/>
+    1. A default quantisation unit of 14.062 5 kt and a maximum of +/- 1 800 kt is obtained for a value of f = 6.<br/>
+    2. Negative values are expressed in 2's complement form, bit-8 is set to 0 for positive values and 1 for negative values.<br/>
+    </desc>
+  </dataitem>
+
+  <dataitem frn="10" id="I001/130" format="variable" length="1">
+    <name>Radar Plot Characteristics</name>
+    <definition>Additional information on the quality of the target report.</definition>
+    <field octed="1" msb="8" lsb="2">
+      <format>hex</format>
+      <desc>Indicator. The actual meaning of the bits is application dependent.</desc>
+    </field>
+    <desc><b>NOTES</b><br/>
+    This Data Item may contain parameters such as plot runlength
+    (primary and secondary), difference between primary and
+      secondary derived azimuth, pulse amplitude, etc.<br/>
+    </desc>
+  </dataitem>
+
+  <dataitem frn="11" id="I001/131" format="fixed" length="1">
+    <name>Received Power</name>
+    <definition>Measurement of the received power.</definition>
+    <field octed="1" msb="8" lsb="1">
+      <format>int</format>
+      <desc>Decimal logarithm of the power received in dBm. POWER = 0 for 0 dBm<br/>
+      (LSB) = 1 dBm
+      </desc>
+    </field>
+    <desc><b>NOTES</b><br/>
+    1.POWER is the measured value of the power received on the sum pattern for a plot.<br/>
+    2.Negative values are expressed in 2's complement form, bit-8 is set to 0 for positive values and 1 for negative values.<br/>
+    </desc>
+  </dataitem>
+  
+  <dataitem frn="9" id="I001/141" format="fixed" length="2">
+    <name>Truncated Time of Day</name>
+    <definition>Absolute time stamping expressed as Coordinated Universal Time (UTC) time.</definition>
+    <field octed="1" msb="16" lsb="1">
+      <format>uint</format>
+      <desc>(2^-7) s = 1/128s</desc>
+    </field>
+    <desc><b>NOTES</b><br/>
+    1. The exchange of this Data Item allows the easy derivation of the correct
+       UTC time value, provided that the clocks at the data source and sink(s)
+       are less than 512 seconds out of synchronisation. Special care has to
+         be taken at the transition of an "all ones" value to an "all zeros" value (every 512 seconds).<br/>
+    2. The time of day value is reset to 0 each day at midnight.<br/>
+    3. For time management in radar transmission applications, refer to Part 1, paragraph 5.4 [Ref. 2].<br/>
+    </desc>
+  </dataitem>
+
+  <dataitem frn="22" id="I001/150" format="fixed" length="1">
+    <name>Presence of X-Pulse</name>
+    <definition>Presence of the X-Pulse for the various modes applied in the interrogation interlace pattern.</definition>
+    <field octed="1" msb="8" lsb="8">
+      <name>XA</name>
+      <enum value="0">Default</enum>
+      <enum value="1">X-pulse received in Mode-3/A reply</enum>
+    </field>
+    <field octed="1" msb="7" lsb="7">
+      <name>Spare</name>
+      <desc>Spare Bits set to zero</desc>
+      <mandatory value="0"></mandatory>
+    </field>
+    <field octed="1" msb="6" lsb="6">
+      <name>XC</name>
+      <enum value="0">Default</enum>
+      <enum value="1">X-pulse received in Mode-C reply</enum>
+    </field>
+    <field octed="1" msb="5" lsb="4">
+      <name>Spare</name>
+      <desc>Spare Bits set to zero</desc>
+      <mandatory value="0"></mandatory>
+    </field>
+    <field octed="1" msb="3" lsb="3">
+      <name>X2</name>
+      <enum value="0">Default</enum>
+      <enum value="1">X-pulse received in Mode-2 reply</enum>
+    </field>
+    <field octed="1" msb="2" lsb="1">
+      <name>Spare</name>
+      <desc>Spare Bits set to zero</desc>
+      <mandatory value="0"></mandatory>
+    </field>
+    <desc><b>NOTES</b><br/>
+    This Data Item is transmitted only if at least one X-pulse has been
+      received in a Mode-A, Mode-2 or Mode-C reply.<br/>
+    </desc>
+  </dataitem>
+
+  <dataitem frn="3" id="I001/161" format="fixed" length="2">
+    <name>Track Plot Number</name>
+    <definition>An integer value representing a unique reference to a track/plot record within a particular track/plot file.</definition>
+    <field octed="1" msb="16" lsb="1">
+      <format>uint</format>
+      <name>Track/Plot Number</name>
+    </field>
+    <desc><b>NOTES</b><br/>
+    The differentiation between track and plot number is either implicit
+    or is made via the Target Report Descriptor (Data Item I001/020).<br/>
+    </desc>
+  </dataitem>
+
+  <dataitem frn="13" id="I001/170" format="variable" length="1">
+    <name>Track Status</name>
+    <definition>Status of track derived either from primary and/or secondary radar information.</definition>
+    <field octed="1" msb="8" lsb="8">
+      <name>CON</name>
+      <enum value="0">Confirmed Track</enum>
+      <enum value="1">Track in initialisation phase</enum>
+    </field>
+    <field octed="1" msb="7" lsb="7">
+      <name>RAD</name>
+      <enum value="0">Primary Track</enum>
+      <enum value="1">SSR/Combined track</enum>
+    </field>
+    <field octed="1" msb="6" lsb="6">
+      <name>MAN</name>
+      <enum value="0">Default</enum>
+      <enum value="1">Aircraft manoeuvring</enum>
+    </field>
+    <field octed="1" msb="5" lsb="5">
+      <name>DOU</name>
+      <enum value="0">Default</enum>
+      <enum value="1">Doubtful plot to track association</enum>
+    </field>
+    <field octed="1" msb="4" lsb="4">
+      <name>RDPC</name>
+      <desc>Radar Data Processing Chain, used to signal the discontinuity of the track numbers.</desc>
+      <enum value="0">RDP Chain 1</enum>
+      <enum value="1">RDP Chain 2</enum>
+    </field>
+    <field octed="1" msb="3" lsb="3">
+      <name>Spare</name>
+      <desc>Spare Bits set to zero</desc>
+      <mandatory value="0"></mandatory>
+    </field>
+    <field octed="1" msb="2" lsb="2">
+      <name>GHO</name>
+      <desc>used to signal that the track is suspected to have been generated by a fake target.</desc>
+      <enum value="0">Default</enum>
+      <enum value="1">Ghost track</enum>
+    </field>
+
+    <field octed="2" msb="8" lsb="8">
+      <name>TRE</name>
+      <enum value="0">Default</enum>
+      <enum value="1">Last report for a track</enum>
+    </field>
+    <field octed="1" msb="7" lsb="2">
+      <name>Spare</name>
+      <desc>Spare Bits set to zero</desc>
+      <mandatory value="0"></mandatory>
+    </field>
+  </dataitem>
+
+  <dataitem frn="6" id="I001/200" format="fixed" length="4">
+    <name>Calculated Track Velocity in Polar Co-ordinates</name>
+    <definition>Calculated track velocity expressed in polar co-ordinates.</definition>
+    <field octed="1" msb="32" lsb="17">
+      <name>Ground Speed</name>
+      <format>uint</format>
+      <desc>(LSB) = 2^-14 NM/s ≅ 0.22 kt Max. val. = 2 NM/s = 7200kt</desc>
+    </field>
+    <field octed="1" msb="16" lsb="1">
+      <name>Heading</name>
+      <format>uint</format>
+      <desc>(LSB) = 360° / 2^16 = 0.0055°</desc>
+    </field>
+  </dataitem>
+
+  <dataitem frn="14" id="I001/210" format="variable" length="1">
+    <name>Track Quality</name>
+    <definition>Relative track quality</definition>
+    <field octed="1" msb="8" lsb="2">
+      <format>uint</format>
+      <name>Quality indicator</name>
+    </field>
+    <desc><b>NOTES</b><br/>
+    Actual bit signification is application dependent.<br/>
+    </desc>
+  </dataitem>
+
+</category>
+
+
+<!--
+  Part 2b
+  Transmission of
+  Monoradar Service
+  Messages
+
+  Edition: 1.0
+  Edition Date: November 1997
+-->
+<category cat="2">
+
+  <dataitem frn="2" id="I002/000" format="fixed" length="1">
+    <name>Message Type</name>
+    <definition>This Data Item allows for a more convenient handling of the messages at the receiver side by further defining the type of transaction.</definition>
+    <field octed="1" msb="8" lsb="1">
+      <name>Message Type</name>
+      <enum value="1">North marker message</enum>
+      <enum value="2">Sector crossing message</enum>
+      <enum value="3">South marker message</enum>
+      <enum value="8">Activation of blind zone filtering</enum>
+      <enum value="9">Stop of blind zone filtering</enum>
+    </field>
+    <desc><b>NOTES</b><br/>
+    1. In application where transactions of various types are exchanged, the Message Type Data Item facilitates the proper message handling at the receiver side.<br/>
+    2. All Message Type values are reserved for common standard use.<br/>
+    3.The following set of Message Types are standardised for category 010 records:<br/>
+    - 001, North marker message;<br/>
+    - 002, Sector crossing message;<br/>
+    - 003, South marker message;<br/>
+    - 008, Activation of blind zone filtering;<br/>
+    - 009, Stop of blind zone filtering.<br/>
+    </desc>
+  </dataitem>
+
+  <dataitem frn="1" id="I002/010" format="fixed" length="2">
+    <name>Data Source Identifier</name>
+    <definition>Identification of the system from which the data are received.</definition>
+    <field octed="1" msb="16" lsb="9">
+      <name>SAC</name>
+      <desc>System Area Code fixed to zero</desc>
+    </field>
+    <field octed="1" msb="8" lsb="1">
+      <name>SIC</name>
+      <desc>System Identification Code</desc>
+    </field>
+    <desc>
+      <b>NOTES</b><br/>
+      1. The defined SACs are listed in Part 1, Table 2 [Ref. 2]<br/>
+      2. The defined SICs are listed in Part 1, Annex B [Ref. 2]<br/>
+    </desc>
+  </dataitem>
+
+  <dataitem frn="3" id="I002/020" format="fixed" length="1">
+    <name>Sector Number</name>
+    <definition>Eight most significant bits of the antenna azimuth defining a particular azimuth sector.</definition>
+    <field octed="1" msb="8" lsb="1">
+      <name>SECTOR NUMBER</name>
+      <desc>(LSB) = 360°/(2^8) = approx. 1.41°</desc>
+    </field>
+    <desc><b>NOTES</b><br/>
+      The use of the antenna azimuth as sector number has the advantage of being independent of the number of sectors implemented.<br/>
+    </desc>
+  </dataitem>
+
+  <dataitem frn="4" id="I002/030" format="fixed" length="3">
+    <name>Time of Day</name>
+    <definition>Absolute time stamping expressed as UTC time.</definition>
+    <field octed="1" msb="24" lsb="1">
+      <format>uint</format>
+      <name>Time Of Day</name>
+      <desc>(LSB) = (2^-7)s = 1/128 s</desc>
+    </field>
+    <desc><b>NOTE</b><br/>
+      1. The time of day value is reset to zero each day at midnight.<br/>
+      2. For time management in radar transmission applications, refer to Part 1, paragraph 5.4 [ Ref.2].<br/>
+      3. Data Item I002/030 can have various logical meanings. In a particular
+         message, the logical meaning is implicit from its context (e.g. in a North
+         marker message it represents the antenna North crossing time; in a
+         sector message it represents the antenna sector crossing time).<br/>
+    </desc>
+  </dataitem>
+  
+  <dataitem frn="5" id="I002/041" format="fixed" length="2">
+    <name>Antenna Rotation Period</name>
+    <definition>Antenna rotation period as measured between two consecutive North crossings or as averaged during a period of time.</definition>
+    <field octed="1" msb="16" lsb="1">
+      <format>uint</format>
+      <name>ANTENNA ROTATION Period</name>
+      <desc>(LSB) = (2^-7)s = 1/128 s</desc>
+    </field>
+  </dataitem>
+  
+  <dataitem frn="6" id="I002/050" format="variable" length="1">
+    <name>Station Configuration Status</name>
+    <definition>Information concerning the use and status of some vital hardware components of the radar system.</definition>
+    <field octed="1" msb="8" lsb="2">
+      <format>uint</format>
+      <name>Status</name>
+    </field>
+    <desc><b>NOTE</b><br/>
+      Due to the diversity in hardware design and requirement of
+      present and future radar stations, it is felt impractical to attempt to
+      define the individual bits.<br/>
+    </desc>
+  </dataitem>
+
+  <dataitem frn="7" id="I002/060" format="variable" length="1">
+    <name>Station Processing Mode</name>
+    <definition>Details concerning the present status with respect to processing parameters and options.</definition>
+    <field octed="1" msb="8" lsb="2">
+      <format>uint</format>
+      <name>Status</name>
+    </field>
+    <desc><b>NOTES</b><br/>
+    1. Typical information conveyed within this Data Item includes inter alia
+       type of polarisation in use, Moving Target Indicator (MTI) in use and/or
+       definition of the range to which MTI is applied, presence of overload
+       conditions and the type of load reduction measures in use.<br/>
+    2. Only the structure of this Data Item is defined, no attempt is made to
+       standardise its contents, in order not to hamper any application or future development.<br/>
+    </desc>
+  </dataitem>
+
+  <dataitem frn="8" id="I002/070" format="repetive" length="2">
+    <name>Plot Count Values</name>
+    <definition>Plot count values according to various plot categories, either for the last full antenna scan or for the last sector processed.</definition>
+    <field octed="1" msb="16" lsb="16">
+      <format>int</format>
+      <name>A</name>
+      <desc>Aerial identification</desc>
+      <enum value="0">Counter for antenna 1</enum>
+      <enum value="1">Counter for antenna 2</enum>
+    </field>
+    <field octed="1" msb="15" lsb="11">
+      <format>uint</format>
+      <name>IDENT</name>
+      <desc>Five-bit plot category identification code</desc>
+      <enum value="1">Sole primary plots</enum>
+      <enum value="2">Sole SSR plots</enum>
+      <enum value="3">Combined plots</enum>      
+    </field>
+    <field octed="1" msb="10" lsb="1">
+      <format>uint</format>
+      <name>COUNTER</name>
+      <desc>10-bit counter value</desc>
+    </field>
+  </dataitem>
+
+  <dataitem frn="11" id="I002/080" format="variable" length="1">
+    <name> Warning/Error Conditions</name>
+    <definition>Warning/error conditions affecting the functioning of the radar system itself.</definition>
+    <field octed="1" msb="8" lsb="2">
+      <format>uint</format>
+      <name>W/E Value</name>
+      <desc>First warning/error condition value</desc>
+    </field>
+    <desc><b>NOTE</b><br/>
+      Warning/error condition values 1-63 are reserved for common
+      Standard use, whereas the values 64-127 are application dependent.<br/>
+    </desc>
+  </dataitem>
+
+  <dataitem frn="10" id="I002/090" format="fixed" length="2">
+    <name>Collimation Error</name>
+    <definition>Averaged difference in range and in azimuth for the primary target position with respect to the SSR target position as
+    calculated by the radar station.</definition>
+    <field octed="1" msb="16" lsb="9">
+      <format>uint</format>
+      <name>RANGE ERROR</name>
+      <desc>(LSB) = 1/128 NM</desc>
+    </field>
+    <field octed="1" msb="8" lsb="1">
+      <format>uint</format>
+      <name>AZIMUTH ERROR</name>
+      <desc>(LSB) = 360°/(2^(16-f))</desc>
+    </field>
+    <desc><b>NOTES</b><br/>
+    1. A default quantisation unit of 0.022° and a range between -2.8125° and
+       +2.7905° is obtained for a value of f=2.<br/>
+    2. Negative values are expressed in 2's complement form, bit-16 and bit-8
+       are set to 0 for positive values and 1 for negative values.<br/> 
+    </desc>
+  </dataitem>
+
+  <dataitem frn="10" id="I002/100" format="fixed" length="8">
+    <name>Dynamic Window - Type 1</name>
+    <definition>Signals the activation of a certain selective filtering function
+      and in a polar coordinates system the respective geographical areas.</definition>
+    <field octed="1" msb="64" lsb="49">
+      <format>uint</format>
+      <name>RHO-START</name>
+      <desc>(LSB) = 1/128 NM. Max. range = 512 NM</desc>
+    </field>
+    <field octed="1" msb="48" lsb="33">
+      <format>uint</format>
+      <name>RHO-END</name>
+      <desc>(LSB) = 1/128 NM. Max. range = 512 NM</desc>
+    </field>
+    <field octed="1" msb="32" lsb="17">
+      <format>uint</format>
+      <name>THETA-START</name>
+      <desc>(LSB) = 360°/(2^16) = 0.0055°</desc>
+    </field>
+    <field octed="1" msb="16" lsb="1">
+      <format>uint</format>
+      <name>THETA-END</name>
+      <desc>(LSB) = 360°/(2^16) = 0.0055°</desc>
+    </field>
+    <desc><b>NOTES</b><br/>
+      The logical meaning of the polar window is defined by its context,
+      given by the Message Type (Data Item I002/000) in the record concerned.<br/>
+    </desc>
+  </dataitem>
+
+  <dataitem frn="13" id="I002/SP" format="explicit" length="1">
+    <name>Special Purpose Field</name>
+  </dataitem>
+ 
+  <dataitem frn="14" id="I002/RE" format="explicit" length="1">
+    <name>Reserved Expansion Field</name>
+  </dataitem>
+
+</category>
+
+
+<!-- 
+  Part 17 : Category 4
+  Safety Net Messages
+  
+  Edition: 1.4
+  Edition Date: October 2010
+-->
+<category cat="4">
+  <dataitem frn="2" id="I004/000" format="fixed" length="1">
+    <name>Message Type</name>
+    <definition>This Data Item allows for a more convenient handling of the messages at the receiver side by further defining the type of transaction.</definition>
+    <field octed="1" msb="8" lsb="1">
+      <name>Message Type</name>
+      <enum value="001">Alive Message</enum>
+      <enum value="002">Route Adherence Monitor Longitudinal Deviation</enum>
+      <enum value="003">Route Adherence Monitor Heading Deviation</enum>
+      <enum value="004">Minimum Safe Altitude Warning</enum>
+      <enum value="005">Area Proximity Warning</enum>
+      <enum value="006">Clearance Level Adherence Monitor</enum>
+      <enum value="007">Short Term Conflict Alert</enum>
+      <enum value="008">Approach Funnel Deviation Alert</enum>
+      <enum value="009">RIMCAS Arrival / Landing Monitor (ALM)</enum>
+      <enum value="010">RIMCAS Arrival / Departure Wrong Runway Alert (WRA)</enum>
+      <enum value="011">RIMCAS Arrival / Departure Opposite Traffic Alert (OTA)</enum>
+      <enum value="012">RIMCAS Departure Monitor (RDM)</enum>
+      <enum value="013">RIMCAS Runway / Taxiway Crossing Monitor (RCM)</enum>
+      <enum value="014">RIMCAS Taxiway Separation Monitor (TSM)</enum>
+      <enum value="015">RIMCAS Unauthorized Taxiway Movement Monitor(UTMM)</enum>
+      <enum value="016">RIMCAS Stop Bar Overrun Alert (SBOA)</enum>
+      <enum value="017">End Of Conflict (EOC)</enum>
+    </field>
+    <desc><b>NOTES</b><br/>
+    1. In applications where transactions of various types are exchanged, the
+      Message Type Data Item facilitates the proper message handling at the receiver side.<br/>
+    2. All Message Type values are reserved for common standard use.<br/>
+    3.The following set of Message Types are standardised for Category 004 records:<br/>
+    • 001 Alive Message<br/>
+    • 002 Route Adherence Monitor Longitudinal Deviation<br/>
+    • 003 Route Adherence Monitor Heading Deviation<br/>
+    • 004 Minimum Safe Altitude Warning<br/>
+    • 005 Area Proximity Warning<br/>
+    • 006 Clearance Level Adherence Monitor<br/>
+    • 007 Short Term Conflict Alert<br/>
+    • 008 Approach Funnel Deviation Alert<br/>
+    • 009 RIMCAS Arrival / Landing Monitor (ALM)<br/>
+    • 010 RIMCAS Arrival / Departure Wrong Runway Alert (WRA)<br/>
+    • 011 RIMCAS Arrival / Departure Opposite Traffic Alert (OTA)<br/>
+    • 012 RIMCAS Departure Monitor (RDM)<br/>
+    • 013 RIMCAS Runway / Taxiway Crossing Monitor (RCM)<br/>
+    • 014 RIMCAS Taxiway Separation Monitor (TSM)<br/>
+    • 015 RIMCAS Unauthorized Taxiway Movement Monitor(UTMM)<br/>
+    • 016 RIMCAS Stop Bar Overrun Alert (SBOA)<br/>
+    • 017 End Of Conflict (EOC)<br/>
+    </desc>
+  </dataitem>
+
+  <dataitem frn="1" id="I004/010" format="fixed" length="2">
+    <name>Data Source Identifier</name>
+    <definition>Identification of the Safety Nets server sending the message.</definition>
+    <field octed="1" msb="16" lsb="9">
+      <name>SAC</name>
+      <desc>System Area Code fixed to zero</desc>
+    </field>
+    <field octed="1" msb="8" lsb="1">
+      <name>SIC</name>
+      <desc>System Identification Code</desc>
+    </field>
+    <desc>
+      <b>NOTE</b><br/>
+      The up-to-date list of SACs is published on the Eurocontrol Web Site (http://www.eurocontrol.int/asterix).<br/>
+    </desc>
+  </dataitem>
+  
+  <dataitem frn="3" id="I004/015" format="repetive" length="2">
+    <name>SDPS Identifier</name>
+    <definition>Identification of the SDPS providing data to the safety nets server.</definition>
+    <field octed="1" msb="16" lsb="9">
+      <name>SAC</name>
+      <desc>System Area Code fixed to zero</desc>
+    </field>
+    <field octed="1" msb="8" lsb="1">
+      <name>SIC</name>
+      <desc>System Identification Code</desc>
+    </field>
+    <desc>
+      <b>NOTE</b><br/>
+      The up-to-date list of SACs is published on the Eurocontrol Web Site (http://www.eurocontrol.int/asterix).<br/>
+    </desc>
+  </dataitem>
+
+  <dataitem frn="4" id="I004/020" format="fixed" length="3">
+    <name>Time of Message</name>
+    <definition>Absolute time stamping of the message in the form of elapsed time since last midnight</definition>
+    <field octed="1" msb="24" lsb="1">
+      <format>uint</format>
+      <name>Time Of Message</name>
+      <desc>(LSB) = (2^-7)s = 1/128 s</desc>
+    </field>
+    <desc><b>NOTE</b><br/>
+    This time is given at an application level (e.g. time at which a message is
+    filled), and not at the communication level (i.e. not the time at which the data-
+    block containing the message is sent).<br/>
+    </desc>
+  </dataitem>
+
+  <dataitem frn="8" id="I004/030" format="fixed" length="2">
+    <name>Track Number 1</name>
+    <definition>Identification of a track number related to conflict</definition>
+    <field octed="1" msb="16" lsb="1">
+      <name>Track Number 1</name>
+      <desc>0 to 65535</desc>
+    </field>
+    <desc><b>NOTES</b><br/>
+    1. This is the track number of the first track involved in the conflict in case
+      of an STCA or a RIMCA or the track involved in case of one of the other Safety Net functions.<br/>
+    2.This track number is distributed in this field exactly as it was received
+    from the Radar Processor Unit (identified by I004/015) and its range is
+      depending on the range used by that unit<br/>
+    </desc>
+  </dataitem>
+
+  <dataitem frn="16" id="I004/035" format="fixed" length="2">
+    <name>Track Number 2</name>
+    <definition> Together with I004/030, this item defines the track pair in conflict.</definition>
+    <field octed="1" msb="16" lsb="1">
+      <name>Track Number 2</name>
+      <desc>0 to 65535</desc>
+    </field>
+    <desc><b>NOTES</b><br/>
+    1. This is the track number of the second track involved in the conflict in case of an STCA or a RIMCA.<br/>
+    2. For the other Safety Net functions, this item is not used.<br/>
+    3. This track number is distributed in this field exactly as it was received
+      from the Radar Processor Unit and its range is depending on the range used by that unit<br/>
+    </desc>
+  </dataitem>
+
+  <dataitem frn="5" id="I004/040" format="fixed" length="2">
+    <name>Alert Identifier</name>
+    <definition>Identification of an alert (Alert number)</definition>
+    <field octed="1" msb="16" lsb="1">
+      <name>Alert Identifier</name>
+      <desc>0 to 65535</desc>
+    </field>
+    <desc><b>NOTES</b><br/>
+    1.This item is the Alert Identification of the conflict in the system<br/>
+    2.This number shall be assigned, by the Safety Net Server, incrementally
+      to every new alert and restart on zero after reaching the maximum value (65535)<br/>
+    </desc>
+  </dataitem>
+  
+  <dataitem frn="6" id="I004/045" format="fixed" length="1">
+    <name>Alert Status</name>
+    <definition>Information concerning status of the alert</definition>
+    <field octed="1" msb="8" lsb="5">
+      <name>Spare</name>
+      <desc>Spare Bits set to zero</desc>
+      <mandatory value="0"></mandatory>
+    </field>
+    <field octed="1" msb="4" lsb="2">
+      <name>Alert status</name>
+      <desc>Status of the alert</desc>
+    </field>
+    <field octed="1" msb="1" lsb="1">
+      <name>Spare</name>
+      <desc>Spare Bits set to zero</desc>
+      <mandatory value="0"></mandatory>
+    </field>
+    <desc><b>NOTES</b><br/>
+    The content of this item is implementation dependent.<br/>
+    </desc>
+  </dataitem>
+
+  <dataitem frn="7" id="I004/060" format="variable" length="1">
+    <name>Safety Net Function and System Status</name>
+    <definition>Status of the Safety Nets functions handled by the system</definition>
+    <field octed="1" msb="8" lsb="8">
+      <name>MRVA</name>
+      <enum value="0">Default</enum>
+      <enum value="1">MRVA function</enum>
+    </field>
+    <field octed="1" msb="7" lsb="7">
+      <name>RAMLD</name>
+      <enum value="0">Default</enum>
+      <enum value="1">RAMLD function</enum>
+    </field>
+    <field octed="1" msb="6" lsb="6">
+      <name>RAMHD</name>
+      <enum value="0">Default</enum>
+      <enum value="1">RAMHD function</enum>
+    </field>
+    <field octed="1" msb="5" lsb="5">
+      <name>MSAW</name>
+      <enum value="0">Default</enum>
+      <enum value="1">MSAW function</enum>
+    </field>
+    <field octed="1" msb="4" lsb="4">
+      <name>APW</name>
+      <enum value="0">Default</enum>
+      <enum value="1">APW function</enum>
+    </field>
+    <field octed="1" msb="3" lsb="3">
+      <name>CLAM</name>
+      <enum value="0">Default</enum>
+      <enum value="1">CLAM function</enum>
+    </field>
+    <field octed="1" msb="2" lsb="2">
+      <name>STCA</name>
+      <enum value="0">Default</enum>
+      <enum value="1">STCA function</enum>
+    </field>
+
+    <field octed="2" msb="8" lsb="8">
+      <name>AFDA</name>
+      <enum value="0">Default</enum>
+      <enum value="1">AFDA function</enum>
+    </field>
+    <field octed="2" msb="7" lsb="7">
+      <name>RIMCA</name>
+      <enum value="0">Default</enum>
+      <enum value="1">RIMCA function</enum>
+    </field>
+    <field octed="2" msb="6" lsb="4">
+      <name>Spare</name>
+      <desc>Spare Bits set to zero</desc>
+      <mandatory value="0"></mandatory>
+    </field>
+    <field octed="2" msb="3" lsb="3">
+      <name>OF</name>
+      <enum value="0">Default</enum>
+      <enum value="1">Overflow error</enum>
+    </field>
+    <field octed="2" msb="2" lsb="2">
+      <name>OL</name>
+      <enum value="0">Default</enum>
+      <enum value="1">Overload error</enum>
+    </field>
+    <desc><b>NOTE</b><br/>
+    1. This item only sent in “alive messages” to describe the status of the
+      Safety Net functions, handled by the system<br/>
+    2. Value 0 means either that the function is not managed by the system or
+      has failed.<br/>
+    3. Value 1 means that the function is managed by the system and is running well<br/>
+    4. “Overflow” is defined as a situation where the number of alerts in the
+      system has exceeded the threshold for safe operation. Potential
+      prioritization of the alerts may lead to a loss of information.<br/>
+    5. “Overload” is defined as a system status in which the number of alerts