MoveIt Pro Behavior Interface  5.0.1
Library for developing custom behaviors for use in MoveIt Pro
moveit_studio::behavior::LoggerBase Class Referenceabstract

Base class to allow Behaviors to report messages with detailed explanations to MoveIt Studio UI. More...

#include <logger.hpp>

Inheritance diagram for moveit_studio::behavior::LoggerBase:

Public Member Functions

virtual ~LoggerBase ()=default
 
virtual void publishFailureMessage (const std::string &error_source_name, const std::string &details="", bool append=true)=0
 Virtual function to publish a failure message. More...
 
virtual void publishWarnMessage (const std::string &source_name, const std::string &details="", bool append=true)=0
 Virtual function to publish a warning message. More...
 
virtual void publishInfoMessage (const std::string &source_name, const std::string &details="", bool append=true)=0
 Virtual function to publish an info message. More...
 
virtual void publishMessage (const int32_t log_level, const std::string &details, bool append_messages=true)=0
 Virtual generic function to publish a message. More...
 
virtual void popMessages (const std::string &default_string="")=0
 Virtual function to propagate queued messages to UI. This function will be called at the end of an Objective. More...
 
virtual void clearMessages ()=0
 Virtual function to clear stored messages. More...
 

Detailed Description

Base class to allow Behaviors to report messages with detailed explanations to MoveIt Studio UI.

Constructor & Destructor Documentation

◆ ~LoggerBase()

virtual moveit_studio::behavior::LoggerBase::~LoggerBase ( )
virtualdefault

Member Function Documentation

◆ clearMessages()

virtual void moveit_studio::behavior::LoggerBase::clearMessages ( )
pure virtual

Virtual function to clear stored messages.

Implemented in moveit_studio::behavior::LoggerROS.

◆ popMessages()

virtual void moveit_studio::behavior::LoggerBase::popMessages ( const std::string &  default_string = "")
pure virtual

Virtual function to propagate queued messages to UI. This function will be called at the end of an Objective.

Parameters
default_messageOptional string defining the message to emit if there are no stored messages.

Implemented in moveit_studio::behavior::LoggerROS.

◆ publishFailureMessage()

virtual void moveit_studio::behavior::LoggerBase::publishFailureMessage ( const std::string &  error_source_name,
const std::string &  details = "",
bool  append = true 
)
pure virtual

Virtual function to publish a failure message.

Parameters
error_source_nameName used to identify the source of the failure.
detailsA detailed message describing the failure. For example, the contents of an exception's message.
append_messagesIf true, the message is queued and later published at the end of the Objective. The default value for this parameter is true. Assign it to false to propagate the error immediatedly to the UI

Implemented in moveit_studio::behavior::LoggerROS.

◆ publishInfoMessage()

virtual void moveit_studio::behavior::LoggerBase::publishInfoMessage ( const std::string &  source_name,
const std::string &  details = "",
bool  append = true 
)
pure virtual

Virtual function to publish an info message.

Parameters
source_nameName used to identify the source of the info.
detailsA detailed message describing the information.
append_messagesIf true, the message is queued and later published at the end of the Objective. The default value for this parameter is true. Assign it to false to propagate the warning immediatedly to the UI

Implemented in moveit_studio::behavior::LoggerROS.

◆ publishMessage()

virtual void moveit_studio::behavior::LoggerBase::publishMessage ( const int32_t  log_level,
const std::string &  details,
bool  append_messages = true 
)
pure virtual

Virtual generic function to publish a message.

Parameters
log_levelmoveit_studio_agent_msgs::msg::ERROR/WARN/INFO
detailsContains the information message
append_messagesIf true, store the message in a vector and the vector of messages is published at the end of the Objective. The default value for this parameter is true. Assign it to false to propagate the info immediatedly to the UI

Implemented in moveit_studio::behavior::LoggerROS.

◆ publishWarnMessage()

virtual void moveit_studio::behavior::LoggerBase::publishWarnMessage ( const std::string &  source_name,
const std::string &  details = "",
bool  append = true 
)
pure virtual

Virtual function to publish a warning message.

Parameters
source_nameName used to identify the source of the warning.
detailsA detailed message describing the warning.
append_messagesIf true, the message is queued and later published at the end of the Objective. The default value for this parameter is true. Assign it to false to propagate the warning immediatedly to the UI

Implemented in moveit_studio::behavior::LoggerROS.


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