Skip to main content

PublisherInterfaceBase Class Template

Defines an interface to a publisher that sends a message to a topic. More...

Declaration

template <typename MessageT>
class moveit_pro::behaviors::PublisherInterfaceBase<MessageT> { ... }

Included Headers

#include <publisher_interface.hpp>

Derived Classes

classRclcppPublisherInterface<MessageT>

Implementation of the publisher interface for a rclcpp publisher. More...

Public Destructor Index

template <typename MessageT>
~PublisherInterfaceBase ()=default

Public Member Functions Index

template <typename MessageT>
auto initialize (const std::string &topic_name, const size_t queue_size, const bool use_best_effort)=0 -> tl::expected< void, std::string >

Virtual function to initialize the publisher interface. More...

template <typename MessageT>
auto publish (const MessageT &message)=0 -> tl::expected< void, std::string >

Virtual function to publish a message to a topic. More...

Description

Defines an interface to a publisher that sends a message to a topic.

Template Parameters
MessageT

Message type used to specialize this class.

Definition at line 25 of file publisher_interface.hpp.

Public Destructor

~PublisherInterfaceBase()

template <typename MessageT>
virtual moveit_pro::behaviors::PublisherInterfaceBase< MessageT >::~PublisherInterfaceBase ()
virtual default

Definition at line 28 of file publisher_interface.hpp.

Public Member Functions

initialize()

template <typename MessageT>
virtual tl::expected< void, std::string > moveit_pro::behaviors::PublisherInterfaceBase< MessageT >::initialize (const std::string & topic_name, const size_t queue_size, const bool use_best_effort)

Virtual function to initialize the publisher interface.

Parameters
topic_name

Name of the topic to use in the publisher interface.

queue_size

The queue size for the publisher interface.

use_best_effort

Whether best_effort should be used or not for the publisher interface.

Returns

Void if the publisher interface was initialized successfully. If initialization failed, an error message string is returned.

Definition at line 38 of file publisher_interface.hpp.

publish()

template <typename MessageT>
virtual tl::expected< void, std::string > moveit_pro::behaviors::PublisherInterfaceBase< MessageT >::publish (const MessageT & message)

Virtual function to publish a message to a topic.

Parameters
message

The message to publish.

Returns

Void if the publisher sent the message successfully. If message publishing failed, an error message string is returned.

Definition at line 47 of file publisher_interface.hpp.


The documentation for this class was generated from the following file:


Generated via doxygen2docusaurus 2.2.2 by Doxygen 1.9.8.