#include <publisher_base.hpp>
◆ IntraProcessManagerSharedPtr
◆ IntraProcessManagerWeakPtr
◆ PublisherBase()
Default constructor.
Typically, a publisher is not created through this method, but instead is created through a call to Node::create_publisher
.
- Parameters
-
[in] | node_base | A pointer to the NodeBaseInterface for the parent node. |
[in] | topic | The topic that this publisher publishes on. |
[in] | type_support | The type support structure for the type to be published. |
[in] | publisher_options | QoS settings for this publisher. |
◆ ~PublisherBase()
virtual rclcpp::PublisherBase::~PublisherBase |
( |
| ) |
|
|
virtual |
◆ get_topic_name()
const char* rclcpp::PublisherBase::get_topic_name |
( |
| ) |
const |
Get the topic that this publisher publishes on.
- Returns
- The topic name.
◆ get_queue_size()
size_t rclcpp::PublisherBase::get_queue_size |
( |
| ) |
const |
Get the queue size for this publisher.
- Returns
- The queue size.
◆ get_gid()
const rmw_gid_t& rclcpp::PublisherBase::get_gid |
( |
| ) |
const |
Get the global identifier for this publisher (used in rmw and by DDS).
- Returns
- The gid.
◆ get_publisher_handle() [1/2]
Get the rcl publisher handle.
- Returns
- The rcl publisher handle.
◆ get_publisher_handle() [2/2]
const rcl_publisher_t* rclcpp::PublisherBase::get_publisher_handle |
( |
| ) |
const |
Get the rcl publisher handle.
- Returns
- The rcl publisher handle.
◆ get_event_handlers()
Get all the QoS event handlers associated with this publisher.
- Returns
- The vector of QoS event handlers.
◆ get_subscription_count()
size_t rclcpp::PublisherBase::get_subscription_count |
( |
| ) |
const |
Get subscription count.
- Returns
- The number of subscriptions.
◆ get_intra_process_subscription_count()
size_t rclcpp::PublisherBase::get_intra_process_subscription_count |
( |
| ) |
const |
Get intraprocess subscription count.
- Returns
- The number of intraprocess subscriptions.
◆ assert_liveliness()
Manually assert that this Publisher is alive (for RMW_QOS_POLICY_LIVELINESS_MANUAL_BY_TOPIC).
If the rmw Liveliness policy is set to RMW_QOS_POLICY_LIVELINESS_MANUAL_BY_TOPIC, the creator of this publisher may manually call assert_liveliness
at some point in time to signal to the rest of the system that this Node is still alive.
- Returns
true
if the liveliness was asserted successfully, otherwise false
◆ get_actual_qos()
rclcpp::QoS rclcpp::PublisherBase::get_actual_qos |
( |
| ) |
const |
Get the actual QoS settings, after the defaults have been determined.
The actual configuration applied when using RMW_QOS_POLICY_*_SYSTEM_DEFAULT can only be resolved after the creation of the publisher, and it depends on the underlying rmw implementation. If the underlying setting in use can't be represented in ROS terms, it will be set to RMW_QOS_POLICY_*_UNKNOWN. May throw runtime_error when an unexpected error occurs.
- Returns
- The actual qos settings.
◆ can_loan_messages()
bool rclcpp::PublisherBase::can_loan_messages |
( |
| ) |
const |
Check if publisher instance can loan messages.
Depending on the middleware and the message type, this will return true if the middleware can allocate a ROS message instance.
◆ operator==() [1/2]
bool rclcpp::PublisherBase::operator== |
( |
const rmw_gid_t & |
gid | ) |
const |
Compare this publisher to a gid.
Note that this function calls the next function.
- Parameters
-
[in] | gid | Reference to a gid. |
- Returns
- True if the publisher's gid matches the input.
◆ operator==() [2/2]
bool rclcpp::PublisherBase::operator== |
( |
const rmw_gid_t * |
gid | ) |
const |
Compare this publisher to a pointer gid.
A wrapper for comparing this publisher's gid to the input using rmw_compare_gids_equal.
- Parameters
-
[in] | gid | A pointer to a gid. |
- Returns
- True if this publisher's gid matches the input.
◆ setup_intra_process()
Implementation utility function used to setup intra process publishing after creation.
◆ add_event_handler()
template<typename EventCallbackT >
◆ rcl_node_handle_
◆ publisher_handle_
◆ event_handlers_
◆ intra_process_is_enabled_
bool rclcpp::PublisherBase::intra_process_is_enabled_ |
|
protected |
◆ weak_ipm_
◆ intra_process_publisher_id_
uint64_t rclcpp::PublisherBase::intra_process_publisher_id_ |
|
protected |
◆ rmw_gid_
The documentation for this class was generated from the following file: