nros C API
Lightweight ROS 2 client for embedded real-time systems
Loading...
Searching...
No Matches
client.h
Go to the documentation of this file.
1
15#ifndef NROS_CLIENT_H
16#define NROS_CLIENT_H
17
18/* Type and function definitions live in <nros/nros_generated.h>.
19 * This per-module header is kept as a thin shim so existing code that
20 * does `#include <nros/client.h>` continues to compile. */
21#include "nros/types.h"
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
27/* ===================================================================
28 * DEPRECATED spellings — phase-379 W6 decision 1 (2026-09-03)
29 *
30 * `try_recv` -> `take` and `reply` -> `response`, the pair rcl / rclcpp /
31 * rclrs use (`rcl_take_response`, `rclcpp::Client::take_response`) and the
32 * pair our own RMW vtable already used one layer down. See
33 * `nros/subscription.h` for the full note on the shape and the ABI cost
34 * (none: these are `static inline`, so `nros_client_take_response*` stay
35 * the only exported symbols).
36 *
37 * Define NROS_NO_DEPRECATED_CLIENT_ALIASES to compile without any of it.
38 *
39 * These are scheduled for removal; migrate.
40 * =================================================================== */
41
42#ifndef NROS_NO_DEPRECATED_CLIENT_ALIASES
43
44NROS_DEPRECATED_MSG("nros_client_try_recv_reply_raw() is deprecated; use "
45 "nros_client_take_response_raw()")
46static inline int32_t nros_client_try_recv_reply_raw(struct nros_client_t* client, uint8_t* buf,
47 size_t buf_len) {
49}
50
51NROS_DEPRECATED_MSG("nros_client_try_recv_response() is deprecated; use "
52 "nros_client_take_response()")
53static inline nros_ret_t nros_client_try_recv_response(struct nros_client_t* client,
54 uint8_t* response_data,
56 size_t* response_len) {
58}
59
60#endif /* NROS_NO_DEPRECATED_CLIENT_ALIASES */
61
62#ifdef __cplusplus
63}
64#endif
65
66#endif /* NROS_CLIENT_H */
uint8_t * buf
Definition client.h:46
uint8_t * response_data
Definition client.h:54
uint8_t size_t buf_len
Definition client.h:47
uint8_t size_t size_t * response_len
Definition client.h:56
uint8_t size_t response_capacity
Definition client.h:55
int32_t nros_client_take_response_raw(struct nros_client_t *client, uint8_t *buf, size_t buf_len)
int nros_ret_t
Definition nros_generated.h:849
nros_ret_t nros_client_take_response(struct nros_client_t *client, uint8_t *response_data, size_t response_capacity, size_t *response_len)
Definition nros_generated.h:2236
Shared types and constants for the nros C API.
#define NROS_DEPRECATED_MSG(msg)
Definition visibility.h:58