rcl
master
C API providing common ROS client library functionality.
|
Go to the documentation of this file.
17 #ifndef RCL__PUBLISHER_H_
18 #define RCL__PUBLISHER_H_
25 #include "rosidl_runtime_c/message_type_support_struct.h"
27 #include "rcl/macros.h"
29 #include "rcl/visibility_control.h"
32 struct rcl_publisher_impl_t;
38 struct rcl_publisher_impl_t *
impl;
156 const rosidl_message_type_support_t * type_support,
157 const char * topic_name,
234 const rosidl_message_type_support_t * type_support,
235 void ** ros_message);
264 void * loaned_message);
328 const void * ros_message,
610 size_t * subscription_count);
652 #endif // RCL__PUBLISHER_H_
const char * rcl_publisher_get_topic_name(const rcl_publisher_t *publisher)
Get the topic name for the publisher.
Structure which encapsulates a ROS Node.
Definition: node.h:39
rcl_context_t * rcl_publisher_get_context(const rcl_publisher_t *publisher)
Return the context associated with this publisher.
rmw_publisher_options_t rmw_publisher_options
rmw specific publisher options, e.g. the rmw implementation specific payload.
Definition: publisher.h:50
bool rcl_publisher_is_valid_except_context(const rcl_publisher_t *publisher)
Return true if the publisher is valid except the context, otherwise false.
rcl_ret_t rcl_publisher_assert_liveliness(const rcl_publisher_t *publisher)
Manually assert that this Publisher is alive (for RMW_QOS_POLICY_LIVELINESS_MANUAL_BY_TOPIC)
rmw_ret_t rcl_ret_t
The type that holds an rcl return code.
Definition: types.h:23
const rmw_qos_profile_t * rcl_publisher_get_actual_qos(const rcl_publisher_t *publisher)
Get the actual qos settings of the publisher.
struct rcl_publisher_impl_t * impl
Pointer to the publisher implementation.
Definition: publisher.h:38
rcl_ret_t rcl_borrow_loaned_message(const rcl_publisher_t *publisher, const rosidl_message_type_support_t *type_support, void **ros_message)
Borrow a loaned message.
const rcl_publisher_options_t * rcl_publisher_get_options(const rcl_publisher_t *publisher)
Return the rcl publisher options.
struct rcl_publisher_t rcl_publisher_t
Structure which encapsulates a ROS Publisher.
rmw_qos_profile_t qos
Middleware quality of service settings for the publisher.
Definition: publisher.h:45
rcl_ret_t rcl_publish_serialized_message(const rcl_publisher_t *publisher, const rcl_serialized_message_t *serialized_message, rmw_publisher_allocation_t *allocation)
Publish a serialized message on a topic using a publisher.
rcl_publisher_t rcl_get_zero_initialized_publisher(void)
Return a rcl_publisher_t struct with members set to NULL.
rcl_ret_t rcl_publisher_init(rcl_publisher_t *publisher, const rcl_node_t *node, const rosidl_message_type_support_t *type_support, const char *topic_name, const rcl_publisher_options_t *options)
Initialize a rcl publisher.
struct rcl_publisher_options_t rcl_publisher_options_t
Options available for a rcl publisher.
Structure which encapsulates a ROS Publisher.
Definition: publisher.h:35
rcl_ret_t rcl_publish(const rcl_publisher_t *publisher, const void *ros_message, rmw_publisher_allocation_t *allocation)
Publish a ROS message on a topic using a publisher.
bool rcl_publisher_is_valid(const rcl_publisher_t *publisher)
Return true if the publisher is valid, otherwise false.
Encapsulates the non-global state of an init/shutdown cycle.
Definition: context.h:113
bool rcl_publisher_can_loan_messages(const rcl_publisher_t *publisher)
Check if publisher instance can loan messages.
rcl_allocator_t allocator
Custom allocator for the publisher, used for incidental allocations.
Definition: publisher.h:48
rcl_ret_t rcl_return_loaned_message_from_publisher(const rcl_publisher_t *publisher, void *loaned_message)
Return a loaned message previously borrowed from a publisher.
rcl_ret_t rcl_publish_loaned_message(const rcl_publisher_t *publisher, void *ros_message, rmw_publisher_allocation_t *allocation)
Publish a loaned message on a topic using a publisher.
Options available for a rcl publisher.
Definition: publisher.h:42
rcl_ret_t rcl_publisher_fini(rcl_publisher_t *publisher, rcl_node_t *node)
Finalize a rcl_publisher_t.
rcl_ret_t rcl_publisher_get_subscription_count(const rcl_publisher_t *publisher, size_t *subscription_count)
Get the number of subscriptions matched to a publisher.
rmw_publisher_t * rcl_publisher_get_rmw_handle(const rcl_publisher_t *publisher)
Return the rmw publisher handle.
rcl_publisher_options_t rcl_publisher_get_default_options(void)
Return the default publisher options in a rcl_publisher_options_t.