Parse msg bounded fields and default values
This commit is contained in:
@@ -9,6 +9,10 @@ Message instances
|
||||
-----------------
|
||||
The type system generates a dataclass for each message type. These dataclasses give direct read write access to all mutable fields of a message. Fields should be mutated with care as no type checking is applied during runtime.
|
||||
|
||||
.. note::
|
||||
|
||||
Limitation: While the type system parses message definitions with array bounds and/or default values, neither bounds nor default values are enforced or assigned to message instances.
|
||||
|
||||
Extending the type system
|
||||
-------------------------
|
||||
Adding custom message types consists of two steps. First, message definitions are converted into parse trees using :py:func:`get_types_from_idl() <rosbags.typesys.get_types_from_idl>` or :py:func:`get_types_from_msg() <rosbags.typesys.get_types_from_msg>`, and second the types are registered in the type system via :py:func:`register_types() <rosbags.typesys.register_types>`. The following example shows how to add messages type definitions from ``.msg`` and ``.idl`` files:
|
||||
|
||||
Reference in New Issue
Block a user