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

#include <nros_generated.h>

Collaboration diagram for nros_executor_t:
Collaboration graph
[legend]

Data Fields

uint64_t _opaque [EXECUTOR_OPAQUE_U64S]
 
size_t handle_count
 
bool in_dispatch
 
uint64_t invocation_time_ns
 
size_t max_handles
 
enum nros_executor_semantics_t semantics
 
size_t service_count
 
enum nros_executor_state_t state
 
size_t subscription_count
 
const struct nros_support_tsupport
 
uint64_t timeout_ns
 
size_t timer_count
 
nros_executor_trigger_t trigger
 
void * trigger_context
 

Detailed Description

Executor structure.

The executor delegates all dispatch logic to an internal executor. The C struct retains state, timeout, and per-type counters for API compatibility.

The internal executor is stored inline in _opaque — no heap allocation is needed. The storage size is computed at build time from NROS_EXECUTOR_MAX_CBS and NROS_EXECUTOR_ARENA_SIZE.

Field Documentation

◆ _opaque

uint64_t nros_executor_t::_opaque[EXECUTOR_OPAQUE_U64S]

Inline opaque storage for the executor. Managed by nros_executor_init/fini — no heap allocation needed.

◆ handle_count

size_t nros_executor_t::handle_count

Number of handles registered

◆ in_dispatch

bool nros_executor_t::in_dispatch

Reentrancy guard: set to true while spin_once is dispatching callbacks. Blocking helpers (nros_client_call, nros_action_send_goal, etc.) check this flag and return NROS_RET_REENTRANT if set.

◆ invocation_time_ns

uint64_t nros_executor_t::invocation_time_ns

Next invocation time in nanoseconds for drift-compensated spin_period

◆ max_handles

size_t nros_executor_t::max_handles

Maximum handles (configured at init)

◆ semantics

enum nros_executor_semantics_t nros_executor_t::semantics

Data communication semantics

◆ service_count

size_t nros_executor_t::service_count

Number of service handles

◆ state

enum nros_executor_state_t nros_executor_t::state

Current state

◆ subscription_count

size_t nros_executor_t::subscription_count

Number of subscription handles

◆ support

const struct nros_support_t* nros_executor_t::support

Pointer to support context

◆ timeout_ns

uint64_t nros_executor_t::timeout_ns

Timeout in nanoseconds for spin_some

◆ timer_count

size_t nros_executor_t::timer_count

Number of timer handles

◆ trigger

nros_executor_trigger_t nros_executor_t::trigger

Trigger function (NULL = default "any" trigger)

◆ trigger_context

void* nros_executor_t::trigger_context

User context for trigger function


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