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

#include <nros_generated.h>

Collaboration diagram for rcl_client_t:

Data Fields

struct ServiceClientInternal _internal
struct rclc_node_ref_t node
struct rcl_client_options_t options
struct rclc_qos_t qos
uint8_t service_name [256]
size_t service_name_len
enum rclc_client_state_t state
uint8_t type_hash [128]
size_t type_hash_len
uint8_t type_name [256]
size_t type_name_len
const struct rclc_service_type_t * type_support

Detailed Description

A service client the executor dispatches (rclc's rcl_client_t).

phase-487 W2 (RFC-0096 D9, the C half): the arena entry owns the client, its reply buffer, the response callback and its context. This struct keeps the arena handle (_internal, with the rclc_client_call timeout) and the description the registration reads. Before W2 the arena entry's callback was a trampoline that read the callback out of THIS struct, a back-reference that made a late reply after rcl_client_fini a use-after-free (issue 1631); the entry now holds the user's callback directly. A client the caller drives itself is a [rclc_polling_client_t].

Field Documentation

◆ _internal

struct ServiceClientInternal rcl_client_t::_internal

Internal state (arena entry index + executor pointer + timeout). Typed C-ABI handle field.

◆ node

struct rclc_node_ref_t rcl_client_t::node

Pointer to parent node

◆ options

struct rcl_client_options_t rcl_client_t::options

Phase 189.M3.3.a — scheduling-context slot to bind the client's executor handle to. 0 = inherit the executor / Node default; set via rclc_client_init_with_options. When non-zero, rclc_executor_attach_client binds the freshly-created handle to this SC after registration.

◆ qos

struct rclc_qos_t rcl_client_t::qos

Phase 193.4b — service-client QoS (applied to both request + reply endpoints). Defaults to the services profile (RELIABLE+VOLATILE+KEEP_LAST(10)); set via rclc_client_init_with_qos.

◆ service_name

uint8_t rcl_client_t::service_name[256]

Service name storage

◆ service_name_len

size_t rcl_client_t::service_name_len

Service name length

◆ state

enum rclc_client_state_t rcl_client_t::state

Current state

◆ type_hash

uint8_t rcl_client_t::type_hash[128]

Type hash storage

◆ type_hash_len

size_t rcl_client_t::type_hash_len

Type hash length

◆ type_name

uint8_t rcl_client_t::type_name[256]

Type name storage

◆ type_name_len

size_t rcl_client_t::type_name_len

Type name length

◆ type_support

const struct rclc_service_type_t* rcl_client_t::type_support

phase-515 C3 — the descriptor this client was created with, kept so rclc_executor_add_client (de)serialises through its codec with rclc's arguments, as a subscription keeps its own (phase-492 W8). Descriptors are generated static consts, so the pointer outlives the client.


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