nros C API
Lightweight ROS 2 client for embedded real-time systems
Loading...
Searching...
No Matches
publisher.h
Go to the documentation of this file.
1
9
10#ifndef NROS_PUBLISHER_H
11#define NROS_PUBLISHER_H
12
13/* Type and function definitions live in <rclc/detail/nros_generated.h>.
14 * This per-module header is kept as a thin shim so existing code that
15 * does `#include <rclc/publisher.h>` continues to compile. */
16#include "rclc/types.h"
17
28#ifndef NROS_NO_DEPRECATED_PUBLISH_RAW_ALIAS
29#if defined(__GNUC__) || defined(__clang__)
30__attribute__((deprecated("renamed to rclc_publish_serialized (phase-515 C8)")))
31#endif
32static inline rcl_ret_t
33rclc_publish_raw(const rcl_publisher_t* publisher, const uint8_t* data, size_t len) {
34 return rclc_publish_serialized(publisher, data, len);
35}
36#endif /* NROS_NO_DEPRECATED_PUBLISH_RAW_ALIAS */
37
75 const struct rcl_node_t* node,
76 const struct rclc_message_type_t* type_info,
77 const char* topic_name) {
78 return rclc_publisher_init_with_qos(publisher, node, type_info, topic_name,
80}
81
82#endif /* NROS_PUBLISHER_H */
83
84/* Every upstream-path header carries the whole C API, as `<rclc/rclc.h>` does
85 * (phase-492): a ported file that includes only `<rclc/publisher.h>` still finds
86 * `RCLC_CHECK_RET`, `RCLC_LOG_*` and the rcl spellings. Outside the guard, so
87 * this header's own declarations are complete before the umbrella reads them. */
88#include "rclc/rclc.h"
rcl_ret_t rclc_publisher_init_with_qos(struct rcl_publisher_t *publisher, const struct rcl_node_t *node, const struct rclc_message_type_t *type_info, const char *topic_name, const struct rclc_qos_t *qos)
rcl_ret_t rclc_publish_serialized(const struct rcl_publisher_t *publisher, const uint8_t *data, size_t len)
const struct rclc_qos_t RCLC_QOS_SENSOR_DATA
int rcl_ret_t
Definition nros_generated.h:977
static rcl_ret_t rclc_publish_raw(const rcl_publisher_t *publisher, const uint8_t *data, size_t len)
Deprecated: renamed to rclc_publish_serialized() (phase-515 C8).
Definition publisher.h:33
static rcl_ret_t rclc_publisher_init_best_effort(struct rcl_publisher_t *publisher, const struct rcl_node_t *node, const struct rclc_message_type_t *type_info, const char *topic_name)
rclc's best-effort preset constructor for a publisher.
Definition publisher.h:74
Umbrella header for the nano-ros C API, at upstream's path.
Definition nros_generated.h:1610
Definition nros_generated.h:2446
Definition nros_generated.h:2237
Shared types and constants for the nros C API.