netmsgs  1.2.2
RoadNarrows Robotics Network Messaging Package
netmsgsgen Man Page
Name:
netmsgsgen - Generate source files from NetMsgs XML specification.
Synopsis:
netmsgsgen [OPTIONS] –lang=c –xml=xmlfile hfile cfile
netmsgsgen [OPTIONS] –lang=python –xml=xmlfile pyfile

netmsgsgen –version
netmsgsgen –help
Description:
The netmsgsgen executable Python scrip generates source files from a NetMsgs XML specfication. Output languages supported are:
  • C
  • python
Options:
Mandatory arguments to long options are also mandatory for short options.
Generate
-d, --debug=level
Print debugging information while parsing the XML file and generating source output.
Debug level is one of: 0 1 2 3.
Default: 0 (off).
-i, --incprefix=path
Include prefix for '#include' in .c source file for generated .h header file.
Default: ''
-l, --lang=lang
Output language generations.
One of: c python.
-o, --overrides=list
XML overrides. List in form of: name=value[,...]
Supported overrides: encoding, endian, ns, brief
-x, --xml=xmlfile
Input NetMsgs XML file relative or absolute path name.
Information
--help
Display command help and exit.
--version
Output version information and exit.
Arguments:
hfile Generated output C .h file relative or absolute path name.
cfile Generated output C .c file relative or absolute path name.
pyfile Generated output Python .py file relative or absolute path name.
Notes:
The netmsgsgen script uses the NetMsgs python package. This package must be installed and the python path environment must point to the installed location.
Examples:
# Example 1 # Generate C source files relative to current working directory. $ $ netmsgsgen --lang=c --xml=AstroMsgs.xml include/AstroMsgs.h AstroMsgs.c $

# Example 2 # Generate Python source file overriding message encoding and namespace. $ $ netmsgsgen --overrides="encoding=flat,ns=Cosmo" --lang=python \ --xml=/myprj/AstroMsgs.xml /myprj/modules/Cosmo/ComosMsgs.py $