netmsgs  1.2.2
RoadNarrows Robotics Network Messaging Package
NetMsgs XML Format

Modules

 DTD
 
 AstroMsgs.xml XML Example
 

Detailed Description

Introduction

The RoadNarrows NetMsgs XML specification defines the message set in XML format. The <netmsgs> element is the root element for XML file. Under it, are three major element sections contains elements to define the format.

XML Basic Layout

Below is the high-level structure of a NetMsgs XML specification.

<netmsgs>
  <meta>
  ...
  </meta>
  <field_types>
  ...
  </field_types>
  <msg_types>
  ...
  </msg_types>
</netmsgs>

<NETMSGS> Root Element

The requiried, top-level root element.

AttributeDescriptionDefault
encoding Message encoding. One of: itv flat. itv
endian Byte ordering. One of: big little native. big

<META> Main Section Element

This section defines the meta data needed to generate the language specific source files correctly.

<BRIEF>

Brief description of the messages. Comment including in doxygen file brief comment.

<NS>

Namespace identifier. The namespace id is appended to source generated declarations and definitions.

<PROLOGUE>

The prologue data is appended to the generated output source file of the given language (sub)type after the file comment block and core include files, and prior to any generated source code.

AttributeDescriptionDefault
lang Source (sub)language: One of: h c python. REQUIRED

<EPILOGUE>

The epilogue data is appended to the end of the generated output source file.

AttributeDescriptionDefault
lang Source (sub)language: One of: h c python. REQUIRED

<FIELD_TYPES> Main Section Element

The field_types section defines ftype extensions to the built-in ftypes. For C, ftype extension are equivalent to typedef's. For python and C++, extensions are derived classes.

<FTYPEDEF>

This element defines a extended field type. For ftype=struct ftypedef elements, one or more fielddef subelements are required.

AttributeDescriptionDefault
ftid Unique extended field type identifier. REQUIRED
ftype Derived or built-in field type value or alias. If '[]' appends the ftype value, then it is vector. REQUIRED
size Maximum number of elements for string or vector type. string: NMFVAL_LEN_MAX_STRING
vector: NMFVAL_LEN_MAX_VECTOR

<MSG_TYPES> Main Section Element

The msg_types section defines the message set.

<MSGDEF>

The msgdef element defines a specific message. Zero or more fielddef subelements may be specified.

AttributeDescriptionDefault
msgid Unique message identifier. REQUIRED

<FIELDDEF> Element

The fielddef element defines a field within a ftypedef element or a msgdef element.

AttributeDescriptionDefault
fname (Sub)message unique field name identifier. REQUIRED
ftype Derived or built-in field type value or alias. If '[]' appends the ftype value, then it is vector. REQUIRED
size Maximum number of elements for string or vector type. string: NMFVAL_LEN_MAX_STRING
vector: NMFVAL_LEN_MAX_VECTOR
disposition Disppositon of this field. One of: active deprecated active

<CONST>

The data defines the constant value for this field. Applicable only for number or string base field types.

<MIN>

The data defines the minimum value for this field. Applicable only for number base field types.

<MAX>

The data defines the maximum value for this field. Applicable only for number base field types.

NetMsgs XML DTD

DTD

XML Example

AstroMsgs.xml XML Example