MoveIt Pro Behavior Interface  5.0.1
Library for developing custom behaviors for use in MoveIt Pro
moveit_studio::behaviors::GetMessageFromTopicBehaviorBase< MessageT >::SubscriberInterfaceBase Class Referenceabstract

Defines an interface to a subscriber that blocks while waiting for a message to be received on a topic. More...

#include <get_message_from_topic.hpp>

Inheritance diagram for moveit_studio::behaviors::GetMessageFromTopicBehaviorBase< MessageT >::SubscriberInterfaceBase:

Public Member Functions

virtual ~SubscriberInterfaceBase ()=default
 
virtual tl::expected< void, std::string > initialize (const std::string &topic_name, const std::chrono::duration< double > wait_for_message_timeout)=0
 Virtual function to initialize the subscriber interface. More...
 
virtual tl::expected< MessageT, std::string > syncGetNextMessage ()=0
 Virtual function to get the next message through the subscriber interface. More...
 

Detailed Description

template<typename MessageT>
class moveit_studio::behaviors::GetMessageFromTopicBehaviorBase< MessageT >::SubscriberInterfaceBase

Defines an interface to a subscriber that blocks while waiting for a message to be received on a topic.

Constructor & Destructor Documentation

◆ ~SubscriberInterfaceBase()

template<typename MessageT >
virtual moveit_studio::behaviors::GetMessageFromTopicBehaviorBase< MessageT >::SubscriberInterfaceBase::~SubscriberInterfaceBase ( )
virtualdefault

Member Function Documentation

◆ initialize()

template<typename MessageT >
virtual tl::expected<void, std::string> moveit_studio::behaviors::GetMessageFromTopicBehaviorBase< MessageT >::SubscriberInterfaceBase::initialize ( const std::string &  topic_name,
const std::chrono::duration< double >  wait_for_message_timeout 
)
pure virtual

Virtual function to initialize the subscriber interface.

Parameters
topic_nameName of the topic to use in the subscriber interface.
wait_for_message_timeoutTimeout duration to use in the subscriber interface.
Returns
Void if the subscriber interface was initialized successfully, or an error result if it could not be initialized successfully.

Implemented in moveit_studio::behaviors::GetMessageFromTopicBehaviorBase< MessageT >::RclcppSubscriberInterface.

◆ syncGetNextMessage()

template<typename MessageT >
virtual tl::expected<MessageT, std::string> moveit_studio::behaviors::GetMessageFromTopicBehaviorBase< MessageT >::SubscriberInterfaceBase::syncGetNextMessage ( )
pure virtual

Virtual function to get the next message through the subscriber interface.

Returns
The message, if it was successfully received, or an error result if the message could not be received.

Implemented in moveit_studio::behaviors::GetMessageFromTopicBehaviorBase< MessageT >::RclcppSubscriberInterface.


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