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

#include <nros_generated.h>

Collaboration diagram for rclc_polling_subscription_t:
Collaboration graph
[legend]

Data Fields

uint64_t _opaque [SUBSCRIPTION_OPAQUE_U64S]
 
struct rclc_node_ref_t node
 
enum rclc_subscription_state_t state
 
const struct rclc_message_type_t * type_support
 

Detailed Description

A subscription the CALLER drains, with no executor (phase-487 W1).

The C counterpart of C++'s nros::PollSubscription<M> and Rust's create_polling_subscription. Nothing dispatches it, so it has no arena slot and keeps its subscriber in its own storage: _opaque holds a RawSubscription<MESSAGE_BUFFER_SIZE> (subscriber, receive buffer and event registrations) from rclc_polling_subscription_init* until rclc_polling_subscription_fini. Zero-initialised is UNINITIALIZED.

It was the NROS_SUBSCRIPTION_STATE_POLLING state of rcl_subscription_t until phase-487, which made every dispatched subscription carry this storage unused.

Field Documentation

◆ _opaque

uint64_t rclc_polling_subscription_t::_opaque[SUBSCRIPTION_OPAQUE_U64S]

Inline storage for the RawSubscription. Internal: treat as opaque.

◆ node

struct rclc_node_ref_t rclc_polling_subscription_t::node

The node the subscriber was created on, kept so fini can refuse a teardown after the node's (RCLC_RET_STALE_NODE).

◆ state

enum rclc_subscription_state_t rclc_polling_subscription_t::state

Current state: UNINITIALIZED, INITIALIZED (subscriber live) or SHUTDOWN.

◆ type_support

const struct rclc_message_type_t* rclc_polling_subscription_t::type_support

phase-492 W8 — the descriptor this subscription was created with, kept so [rclc_polling_subscription_take] deserialises through its codec.


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