Skip to main content

Module msg_parser

Module msg_parser 

Source

Structs§

MsgField
MsgResolver
MsgSpec
ResolveContext
SrvSpec

Enums§

IdlKind
MsgTypeRef
RosPrimitive
Strongly-typed enum of every ROS2 IDL primitive. This is the single source of truth for how a primitive maps to wire formats across generators. Both proto_gen and mcp_python_gen consume the methods on this enum so a new primitive only has to be added here once.

Functions§

format_resolve_error
index_msg_files
index_srv_files
infer_package_name
infer_srv_package_name
is_ros_primitive
Back-compat alias around the canonical RosPrimitive::parse. Kept because external callers may still spell it this way.
package_aliases
parse_msg_field_type
Parse the type-side of one .msg field line. Returns (type_ref, is_array, array_size, string_max_len).
parse_msg_file
parse_qualified_type_ref
Like parse_ridl_type_ref but also returns whether the middle was msg or srv. Returns None for any other middle segment or for shapes that aren’t pkg/<msg|srv>/Name.
parse_ridl_type_ref
Parse a fully-qualified IDL type ref of the form pkg/msg/Name or pkg/srv/Name. Returns (package, name) — the middle segment is dropped after validation. Use parse_qualified_type_ref if the caller needs to know whether it was a msg or srv reference.
parse_srv_file
ros_msg_type_fmt