Table Of Contents

Previous topic

User macro reference

Next topic

Developer documenation

This Page

genmsg Python API


class genmsg.MsgSpec(types, names, constants, text, full_name, package='', short_name='')

Container class for storing loaded msg description files. Field types and names are stored in separate lists with 1-to-1 correspondence. MsgSpec can also return an md5 of the source text.

Returns:zip list of types and names (e.g. [(‘int32’, ‘x’), (‘int32’, ‘y’)], [(str,str),]
Returns:True if msg decription contains a ‘Header header’ declaration at the beginning, bool
Returns:list of Field classes, [Field,]
class genmsg.SrvSpec(request, response, text, full_name='', short_name='', package='')
class genmsg.Constant(type_, name, val, val_text)

Container class for holding a Constant declaration


  • type
  • name
  • val
  • val_text
class genmsg.Field(name, type)

Container class for storing information about a single field in a MsgSpec


  • name
  • type
  • base_type
  • is_array
  • array_len
  • is_builtin
  • is_header