nros C API
Lightweight ROS 2 client for embedded real-time systems
Loading...
Searching...
No Matches
Data Fields
rclc_message_type_t Struct Reference

#include <nros_generated.h>

Data Fields

rclc_message_deserialize_fn_t deserialize
 
rclc_message_serialize_fn_t serialize
 
size_t serialized_size_max
 
const char * type_hash
 
const char * type_name
 

Detailed Description

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 phase-492 W8 (RFC-0089 "`ROSIDL_GET_*_TYPE_SUPPORT` 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.

Field Documentation

◆ deserialize

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.

◆ serialize

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.

◆ serialized_size_max

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.

◆ type_hash

const char* rclc_message_type_t::type_hash

Type hash (RIHS format)

◆ type_name

const char* rclc_message_type_t::type_name

Type name (e.g., "std_msgs::msg::dds_::Int32")


The documentation for this struct was generated from the following file: