Class LocalMessageDefinitionSource
Defined in File local_message_definition_source.hpp
Nested Relationships
Nested Types
Class Documentation
-
class LocalMessageDefinitionSource
Public Types
Public Functions
-
rosbag2_storage::MessageDefinition get_full_text(const std::string &root_type)
Concatenate the message definition with its dependencies into a self-contained schema. The format is different for MSG/SRV/ACTION and IDL definitions, and is described fully in docs/message_definition_encoding.md For SRV type, root_type must include a string ‘/srv/’. For ACTION type, root_type must include a string ‘/action/’. Throws DefinitionNotFoundError if one or more definition files are missing for the given package resource name.
-
rosbag2_storage::MessageDefinition get_full_text_ext(const std::string &root_type, const std::string &topic_name)
Try to get the message definition and concatenate it with its dependencies into a self-contained schema.
The format is different for MSG/SRV/ACTION and IDL definitions, and is described fully in the docs/message_definition_encoding.md. For SRV type, root_type must include a string ‘/srv/’. For ACTION type, root_type must include a string ‘/action/’.
Note
That for service or action introspection topics, the topic type will be extended to the inner original service or action type, respectively, before trying to find the message definition.
- Parameters:
topic_name – [in] The topic name, which is used to determine the message definition format.
root_type – [in] The root type of the message definition, which should be a fully qualified datatype name.
- Throws:
DefinitionNotFoundError – if one or more definition files are missing for the corresponding package resource name or if the package resource name cannot be determined.
- Returns:
A MessageDefinition object containing the encoded message definition and its dependencies.
-
explicit LocalMessageDefinitionSource() = default
-
LocalMessageDefinitionSource(const LocalMessageDefinitionSource&) = delete
-
LocalMessageDefinitionSource(const LocalMessageDefinitionSource&&) = delete
-
rosbag2_storage::MessageDefinition get_full_text(const std::string &root_type)