nros C API
Lightweight ROS 2 client for embedded real-time systems
Loading...
Searching...
No Matches
service.h
Go to the documentation of this file.
1
28#ifndef NROS_SERVICE_H
29#define NROS_SERVICE_H
30
31/* Type and function definitions live in <rclc/detail/nros_generated.h>.
32 * This per-module header is kept as a thin shim so existing code that
33 * does `#include <rclc/service.h>` continues to compile. */
34#include "rclc/types.h"
35
62static inline struct rclc_qos_t rclc_qos_services_best_effort(void) {
63 struct rclc_qos_t qos = RCLC_QOS_SERVICES;
65 return qos;
66}
67
90 const struct rcl_node_t* node,
91 const struct rclc_service_type_t* type_info,
92 const char* service_name) {
94 return rclc_service_init_with_qos(service, node, type_info, service_name, &qos);
95}
96
97#endif /* NROS_SERVICE_H */
98
99/* Every upstream-path header carries the whole C API, as `<rclc/rclc.h>` does
100 * (phase-492): a ported file that includes only `<rclc/service.h>` still finds
101 * `RCLC_CHECK_RET`, `RCLC_LOG_*` and the rcl spellings. Outside the guard, so
102 * this header's own declarations are complete before the umbrella reads them. */
103#include "rclc/rclc.h"
int rcl_ret_t
Definition nros_generated.h:903
@ RCLC_QOS_RELIABILITY_BEST_EFFORT
Definition nros_generated.h:499
const struct rclc_qos_t RCLC_QOS_SERVICES
rcl_ret_t rclc_service_init_with_qos(struct rcl_service_t *service, const struct rcl_node_t *node, const struct rclc_service_type_t *type_info, const char *service_name, const struct rclc_qos_t *qos)
Umbrella header for the nano-ros C API, at upstream's path.
static rcl_ret_t rclc_service_init_best_effort(struct rcl_service_t *service, const struct rcl_node_t *node, const struct rclc_service_type_t *type_info, const char *service_name)
rclc's best-effort preset constructor for a service server.
Definition service.h:89
static struct rclc_qos_t rclc_qos_services_best_effort(void)
The QoS rclc's service/client _best_effort presets actually use.
Definition service.h:62
Definition nros_generated.h:1454
Definition nros_generated.h:2394
Definition nros_generated.h:1732
enum rclc_qos_reliability_t reliability
Definition nros_generated.h:1736
Definition nros_generated.h:2766
Shared types and constants for the nros C API.