rclcpp
master
C++ ROS Client Library API
|
Go to the documentation of this file.
15 #ifndef RCLCPP__PUBLISHER_BASE_HPP_
16 #define RCLCPP__PUBLISHER_BASE_HPP_
28 #include "rcl/publisher.h"
40 namespace node_interfaces
42 class NodeBaseInterface;
43 class NodeTopicsInterface;
46 namespace experimental
52 class IntraProcessManager;
57 friend ::rclcpp::node_interfaces::NodeTopicsInterface;
75 const rosidl_message_type_support_t & type_support,
193 uint64_t intra_process_publisher_id,
197 template<
typename EventCallbackT>
200 const EventCallbackT & callback,
201 const rcl_publisher_event_type_t event_type)
206 rcl_publisher_event_init,
232 #endif // RCLCPP__PUBLISHER_BASE_HPP_
IntraProcessManagerWeakPtr weak_ipm_
Definition: publisher_base.hpp:224
const char * get_topic_name() const
Get the topic that this publisher publishes on.
void default_incompatible_qos_callback(QOSOfferedIncompatibleQoSInfo &info) const
std::shared_ptr< rcl_publisher_t > get_publisher_handle()
Get the rcl publisher handle.
std::vector< std::shared_ptr< rclcpp::QOSEventHandlerBase > > event_handlers_
Definition: publisher_base.hpp:219
size_t get_queue_size() const
Get the queue size for this publisher.
std::shared_ptr< rcl_publisher_t > publisher_handle_
Definition: publisher_base.hpp:217
bool operator==(const rmw_gid_t &gid) const
Compare this publisher to a gid.
This header provides the get_node_base_interface() template function.
Definition: allocator_common.hpp:24
PublisherBase(rclcpp::node_interfaces::NodeBaseInterface *node_base, const std::string &topic, const rosidl_message_type_support_t &type_support, const rcl_publisher_options_t &publisher_options)
Default constructor.
#define RCLCPP_PUBLIC
Definition: visibility_control.hpp:50
Pure virtual interface class for the NodeBase part of the Node API.
Definition: node_base_interface.hpp:36
Encapsulation of Quality of Service settings.
Definition: qos.hpp:59
#define RCLCPP_SMART_PTR_DEFINITIONS(...)
Definition: macros.hpp:36
void setup_intra_process(uint64_t intra_process_publisher_id, IntraProcessManagerSharedPtr ipm)
Implementation utility function used to setup intra process publishing after creation.
std::shared_ptr< rcl_node_t > rcl_node_handle_
Definition: publisher_base.hpp:215
Definition: publisher_base.hpp:55
void add_event_handler(const EventCallbackT &callback, const rcl_publisher_event_type_t event_type)
Definition: publisher_base.hpp:199
#define RCUTILS_WARN_UNUSED
bool intra_process_is_enabled_
Definition: publisher_base.hpp:223
T emplace_back(T... args)
bool can_loan_messages() const
Check if publisher instance can loan messages.
rmw_gid_t rmw_gid_
Definition: publisher_base.hpp:227
uint64_t intra_process_publisher_id_
Definition: publisher_base.hpp:225
size_t get_subscription_count() const
Get subscription count.
const std::vector< std::shared_ptr< rclcpp::QOSEventHandlerBase > > & get_event_handlers() const
Get all the QoS event handlers associated with this publisher.
RCUTILS_WARN_UNUSED bool assert_liveliness() const
Manually assert that this Publisher is alive (for RMW_QOS_POLICY_LIVELINESS_MANUAL_BY_TOPIC).
Definition: qos_event.hpp:106
size_t get_intra_process_subscription_count() const
Get intraprocess subscription count.
const rmw_gid_t & get_gid() const
Get the global identifier for this publisher (used in rmw and by DDS).
rclcpp::QoS get_actual_qos() const
Get the actual QoS settings, after the defaults have been determined.