mc_control::fsm::MessageState Struct Reference

#include <mc_control/fsm/states/Message.h>

Inheritance diagram for mc_control::fsm::MessageState:
Collaboration diagram for mc_control::fsm::MessageState:

Public Member Functions

void configure (const mc_rtc::Configuration &config) override
 
void start (Controller &) override
 
bool run (Controller &) override
 
void teardown (Controller &) override
 
- Public Member Functions inherited from mc_control::fsm::State
virtual ~State ()
 
void configure_ (const mc_rtc::Configuration &config)
 
void start_ (Controller &ctl)
 
void teardown_ (Controller &ctl)
 
virtual void stop (Controller &)
 
virtual bool read_msg (std::string &)
 
virtual bool read_write_msg (std::string &, std::string &)
 
const std::string & output () const noexcept
 
const std::string & name ()
 
void name (const std::string &n)
 

Protected Attributes

std::string prefix_
 
std::string message_
 
std::string logType_ = "info"
 
bool gui_ = false
 
std::vector< std::string > guiCategory_
 
std::string labelName_
 
- Protected Attributes inherited from mc_control::fsm::State
mc_rtc::Configuration add_contacts_config_
 
mc_rtc::Configuration remove_contacts_config_
 
mc_rtc::Configuration add_contacts_after_config_
 
mc_rtc::Configuration remove_contacts_after_config_
 
mc_rtc::Configuration add_collisions_config_
 
mc_rtc::Configuration remove_collisions_config_
 
mc_rtc::Configuration add_collisions_after_config_
 
mc_rtc::Configuration remove_collisions_after_config_
 
mc_rtc::Configuration constraints_config_
 
mc_rtc::Configuration tasks_config_
 
mc_rtc::Configuration remove_posture_task_
 
mc_rtc::Configuration config_
 
std::vector< mc_solver::ConstraintSetPtrconstraints_
 
std::vector< std::pair< mc_tasks::MetaTaskPtr, mc_rtc::Configuration > > tasks_
 
std::vector< mc_tasks::PostureTaskPtrpostures_
 

Additional Inherited Members

- Protected Member Functions inherited from mc_control::fsm::State
void output (const std::string &o)
 

Detailed Description

Implements a simple Message state to display debug information in the FSM

Messages can be shown in the CLI as mc_rtc::log calls, or in the GUI as Label elements.

This state always outputs "OK" and is always completed.

Member Function Documentation

◆ configure()

void mc_control::fsm::MessageState::configure ( const mc_rtc::Configuration config)
overridevirtual

Called to configure the state.

This is called multiple times:

  • once for every level of state inheritance
  • once with the executor configuration, this is the FSM global executor, the Meta state executor, the Parallel state or any state that handle other states

The default implementation simply loads the provided configuration into the config_ protected members. You can override this behavior to implement a more complex loading logic.

You can access this configuration either via the config_ variable

Reimplemented from mc_control::fsm::State.

◆ run()

bool mc_control::fsm::MessageState::run ( Controller ctl)
overridevirtual

Called every iteration until it returns true

Implements mc_control::fsm::State.

◆ start()

void mc_control::fsm::MessageState::start ( Controller ctl)
overridevirtual

Called before the state starts being run

This will be called only once with the state fully configured.

Implements mc_control::fsm::State.

◆ teardown()

void mc_control::fsm::MessageState::teardown ( Controller ctl)
overridevirtual

Called right before destruction

Implements mc_control::fsm::State.

Member Data Documentation

◆ gui_

bool mc_control::fsm::MessageState::gui_ = false
protected

◆ guiCategory_

std::vector<std::string> mc_control::fsm::MessageState::guiCategory_
protected

◆ labelName_

std::string mc_control::fsm::MessageState::labelName_
protected

◆ logType_

std::string mc_control::fsm::MessageState::logType_ = "info"
protected

◆ message_

std::string mc_control::fsm::MessageState::message_
protected

◆ prefix_

std::string mc_control::fsm::MessageState::prefix_
protected

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