![]() |
netmsgs
1.2.2
RoadNarrows Robotics Network Messaging Package
|
Modules | |
| DTD | |
| AstroMsgs.xml XML Example | |
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.
Below is the high-level structure of a NetMsgs XML specification.
<netmsgs> <meta> ... </meta> <field_types> ... </field_types> <msg_types> ... </msg_types> </netmsgs>
The requiried, top-level root element.
| Attribute | Description | Default |
| encoding | Message encoding. One of: itv flat. | itv |
| endian | Byte ordering. One of: big little native. | big |
This section defines the meta data needed to generate the language specific source files correctly.
Brief description of the messages. Comment including in doxygen file brief comment.
Namespace identifier. The namespace id is appended to source generated declarations and definitions.
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.
| Attribute | Description | Default |
| lang | Source (sub)language: One of: h c python. | REQUIRED |
The epilogue data is appended to the end of the generated output source file.
| Attribute | Description | Default |
| lang | Source (sub)language: One of: h c python. | REQUIRED |
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.
This element defines a extended field type. For ftype=struct ftypedef elements, one or more fielddef subelements are required.
| Attribute | Description | Default |
| 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 |
The msg_types section defines the message set.
The msgdef element defines a specific message. Zero or more fielddef subelements may be specified.
| Attribute | Description | Default |
| msgid | Unique message identifier. | REQUIRED |
The fielddef element defines a field within a ftypedef element or a msgdef element.
| Attribute | Description | Default |
| 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 |
The data defines the constant value for this field. Applicable only for number or string base field types.
The data defines the minimum value for this field. Applicable only for number base field types.
The data defines the maximum value for this field. Applicable only for number base field types.