Public Member Functions |
Static Public Member Functions |
Static Public Attributes |
List of all members
chrono::ros::core::Schema Class Reference
Description
A complete, self-contained description of one root message type and every type nested within it.
Immutable once built (treat as such after Finalize).
#include <ChROSSchema.h>
Public Member Functions | |
| int32_t | AddType (const std::string &type_name) |
| Add a type and return its index. Names must be unique. | |
| void | AddField (int32_t type_index, FieldRecord field) |
| Append a field to a previously added type. | |
| void | Finalize (int32_t root_index) |
| Designate the root type and validate the whole schema: every nested reference must resolve, the root must be set, names must be non-empty. More... | |
| bool | IsFinalized () const |
| int32_t | RootIndex () const |
| const TypeRecord & | Root () const |
| const TypeRecord & | At (int32_t index) const |
| size_t | TypeCount () const |
| int32_t | FindType (const std::string &type_name) const |
| Index of a type by full name, or -1. | |
| std::string | ToString () const |
| Pretty-print in a .msg-like layout (for diagnostics and DescribeType). | |
| std::vector< uint8_t > | EncodeBlob () const |
Static Public Member Functions | |
| static std::shared_ptr< const Schema > | DecodeBlob (const uint8_t *data, size_t size) |
Static Public Attributes | |
| static constexpr uint16_t | kBlobVersion = 1 |
Member Function Documentation
◆ Finalize()
| void chrono::ros::core::Schema::Finalize | ( | int32_t | root_index | ) |
Designate the root type and validate the whole schema: every nested reference must resolve, the root must be set, names must be non-empty.
Throws SchemaError with a precise description on any violation.
The documentation for this class was generated from the following files:
- /builds/uwsbel/chrono/src/chrono_ros/core/ChROSSchema.h
- /builds/uwsbel/chrono/src/chrono_ros/core/ChROSSchema.cpp