|
nros C API
Lightweight ROS 2 client for embedded real-time systems
|
#include <nros_generated.h>
Data Fields | |
| rclc_message_deserialize_fn_t | deserialize |
| size_t | message_size |
| rclc_message_serialize_fn_t | serialize |
| size_t | serialized_size_max |
| const char * | type_hash |
| const char * | type_name |
Message type descriptor: what ROSIDL_GET_MSG_TYPE_SUPPORT(pkg, msg, Name) yields.
The generated <pkg>__msg__<Name>__nros_type is a static const of this type in read-only memory. It carries the type's NAME and HASH (what the RMW needs to create an entity) and (since ROSIDL_GET_*_TYPE_SUPPORT is adopted as a pass-through) its CODEC, so rcl_publish and rclc_executor_add_subscription_with_context work on the generated struct with rclc's arguments. It is NOT rosidl's rosidl_message_type_support_t, which stays undeclared: that struct's members (typesupport_identifier, data, func) are a dispatcher this descriptor does not have.
| rclc_message_deserialize_fn_t rclc_message_type_t::deserialize |
The type's deserialiser; NULL in a descriptor built from names alone, which rclc_executor_add_subscription_with_context refuses.
| size_t rclc_message_type_t::message_size |
The message struct's size in memory, sizeof(<pkg>__msg__<Name>): what rclc_executor_add_subscription_sized checks the caller's msg buffer against. 0 = unknown (a descriptor built from names alone, or generated before this field), which no buffer is refused against. APPENDED: a descriptor written without it zero-fills it.
| rclc_message_serialize_fn_t rclc_message_type_t::serialize |
The type's serialiser; NULL in a descriptor built from names alone, which rcl_publish refuses with RCL_RET_UNSUPPORTED.
| size_t rclc_message_type_t::serialized_size_max |
Largest CDR payload this type can arrive as, encapsulation header included (the generated __RX_MAX_SERIALIZED_SIZE). 0 = unbounded or unknown.
| const char* rclc_message_type_t::type_hash |
Type hash (RIHS format)
| const char* rclc_message_type_t::type_name |
Type name (e.g., "std_msgs::msg::dds_::Int32")