rcl
master
C API providing common ROS client library functionality.
|
Go to the documentation of this file.
17 #ifndef RCL__SUBSCRIPTION_H_
18 #define RCL__SUBSCRIPTION_H_
25 #include "rosidl_runtime_c/message_type_support_struct.h"
27 #include "rcl/macros.h"
29 #include "rcl/visibility_control.h"
34 struct rcl_subscription_impl_t;
40 struct rcl_subscription_impl_t *
impl;
160 const rosidl_message_type_support_t * type_support,
161 const char * topic_name,
408 void ** loaned_message,
440 void * loaned_message);
574 size_t * publisher_count);
618 #endif // RCL__SUBSCRIPTION_H_
Structure which encapsulates a ROS Node.
Definition: node.h:39
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.
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.
bool rcl_subscription_is_valid(const rcl_subscription_t *subscription)
Check that the subscription is valid.
rcl_allocator_t allocator
Custom allocator for the subscription, used for incidental allocations.
Definition: subscription.h:50
rmw_subscription_options_t rmw_subscription_options
rmw specific subscription options, e.g. the rmw implementation specific payload.
Definition: subscription.h:52
rmw_ret_t rcl_ret_t
The type that holds an rcl return code.
Definition: types.h:23
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.
struct rcl_subscription_impl_t * impl
Pointer to the subscription implementation.
Definition: subscription.h:40
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.
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.
rcl_ret_t rcl_subscription_fini(rcl_subscription_t *subscription, rcl_node_t *node)
Finalize a rcl_subscription_t.
rmw_qos_profile_t qos
Middleware quality of service settings for the subscription.
Definition: subscription.h:47
rcl_ret_t rcl_take_sequence(const rcl_subscription_t *subscription, size_t count, rmw_message_sequence_t *message_sequence, rmw_message_info_sequence_t *message_info_sequence, rmw_subscription_allocation_t *allocation)
Take a sequence of messages from a topic using a rcl subscription.
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.
const char * rcl_subscription_get_topic_name(const rcl_subscription_t *subscription)
Get the topic name for the 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.
rcl_subscription_t rcl_get_zero_initialized_subscription(void)
Return a rcl_subscription_t struct with members set to NULL.
struct rcl_subscription_options_t rcl_subscription_options_t
Options available for a rcl subscription.
Options available for a rcl subscription.
Definition: subscription.h:44
rcl_subscription_options_t rcl_subscription_get_default_options(void)
Return the default subscription options in a rcl_subscription_options_t.
Structure which encapsulates a ROS Subscription.
Definition: subscription.h:37
const rcl_subscription_options_t * rcl_subscription_get_options(const rcl_subscription_t *subscription)
Return the rcl subscription options.
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.