15 #ifndef RCL__SUBSCRIPTION_H_ 16 #define RCL__SUBSCRIPTION_H_ 23 #include "rosidl_generator_c/message_type_support_struct.h" 30 struct rcl_subscription_impl_t;
35 struct rcl_subscription_impl_t *
impl;
154 const rosidl_message_type_support_t * type_support,
155 const char * topic_name,
348 void ** loaned_message,
380 void * loaned_message);
514 size_t * publisher_count);
555 #endif // RCL__SUBSCRIPTION_H_ rmw_subscription_t * rcl_subscription_get_rmw_handle(const rcl_subscription_t *subscription)
Return the rmw subscription handle.
const rmw_qos_profile_t * rcl_subscription_get_actual_qos(const rcl_subscription_t *subscription)
Get the actual qos settings of the subscription.
Options available for a rcl subscription.
Definition: subscription.h:39
bool rcl_subscription_can_loan_messages(const rcl_subscription_t *subscription)
Check if subscription instance can loan messages.
struct rcl_subscription_t rcl_subscription_t
Structure which encapsulates a ROS Subscription.
rmw_ret_t rcl_ret_t
Definition: types.h:20
rcl_ret_t rcl_subscription_init(rcl_subscription_t *subscription, const rcl_node_t *node, const rosidl_message_type_support_t *type_support, const char *topic_name, const rcl_subscription_options_t *options)
Initialize a ROS subscription.
rcl_ret_t rcl_return_loaned_message_from_subscription(const rcl_subscription_t *subscription, void *loaned_message)
Return a loaned message from a topic using a rcl subscription.
rmw_qos_profile_t qos
Middleware quality of service settings for the subscription.
Definition: subscription.h:42
bool rcl_subscription_is_valid(const rcl_subscription_t *subscription)
Check that the subscription is valid.
const rcl_subscription_options_t * rcl_subscription_get_options(const rcl_subscription_t *subscription)
Return the rcl subscription options.
rcl_subscription_options_t rcl_subscription_get_default_options(void)
Return the default subscription options in a rcl_subscription_options_t.
#define RCL_WARN_UNUSED
Ignored return values of functions with this macro will emit a warning.
Definition: macros.h:25
struct rcl_subscription_options_t rcl_subscription_options_t
Options available for a rcl subscription.
#define RCL_PUBLIC
Definition: visibility_control.h:48
rmw_subscription_options_t rmw_subscription_options
rmw specific subscription options, e.g. the rmw implementation specific payload.
Definition: subscription.h:47
rmw_ret_t rcl_subscription_get_publisher_count(const rcl_subscription_t *subscription, size_t *publisher_count)
Get the number of publishers matched to a subscription.
struct rcl_subscription_impl_t * impl
Definition: subscription.h:35
Structure which encapsulates a ROS Subscription.
Definition: subscription.h:33
rcl_ret_t rcl_take_serialized_message(const rcl_subscription_t *subscription, rcl_serialized_message_t *serialized_message, rmw_message_info_t *message_info, rmw_subscription_allocation_t *allocation)
Take a serialized raw message from a topic using a rcl subscription.
rcl_ret_t rcl_take(const rcl_subscription_t *subscription, void *ros_message, rmw_message_info_t *message_info, rmw_subscription_allocation_t *allocation)
Take a ROS message from a topic using a rcl subscription.
rcl_allocator_t allocator
Custom allocator for the subscription, used for incidental allocations.
Definition: subscription.h:45
rcl_ret_t rcl_take_loaned_message(const rcl_subscription_t *subscription, void **loaned_message, rmw_message_info_t *message_info, rmw_subscription_allocation_t *allocation)
Take a loaned message from a topic using a rcl subscription.
Structure which encapsulates a ROS Node.
Definition: node.h:37
const char * rcl_subscription_get_topic_name(const rcl_subscription_t *subscription)
Get the topic name for the subscription.
rcl_ret_t rcl_subscription_fini(rcl_subscription_t *subscription, rcl_node_t *node)
Finalize a rcl_subscription_t.
rcl_subscription_t rcl_get_zero_initialized_subscription(void)
Return a rcl_subscription_t struct with members set to NULL.