mcap_ros1.decoder module

class mcap_ros1.decoder.Decoder[source]

Bases: object

Decodes ROS 1 messages.

Deprecated since version 0.7.0: Use DecoderFactory with McapReader instead.

decode(schema: Schema, message: Message) Any[source]
class mcap_ros1.decoder.DecoderFactory[source]

Bases: DecoderFactory

Provides functionality to an McapReader to decode ROS 1 messages. Requires a valid ros1msg schema to decode messages.

decoder_for(message_encoding: str, schema: Schema | None) Callable[[bytes], Any] | None[source]

If the message encoding and schema arguments can be decoded by this decoder factory, returns a callable to decode message bytes.

exception mcap_ros1.decoder.McapROS1DecodeError[source]

Bases: McapError

Raised if a MCAP message record cannot be decoded as a ROS1 message.