State Machine  0.5.0
This repository contains packages for creating and running general purpose state machines.
state_machine_ros::StateRos Class Reference

#include <StateRos.hpp>

Inheritance diagram for state_machine_ros::StateRos:
Inheritance graph

Public Member Functions

 StateRos (ros::NodeHandle &nodeHandle, state_machine::ContextPtr context, std::string name, const std::set< std::string > &outcomes)
 ~StateRos () override=default
- Public Member Functions inherited from state_machine::State
 State (ContextPtr context, std::string name, std::set< std::string > outcomes)
virtual ~State ()=default
ContextPtr getContext () const
void setName (const std::string &name)
const std::string & getName () const
NestedName getNestedName () const
const std::set< std::string > & getOutcomes () const
const std::string & getType () const
void resetIds ()
const std::string & getKeyPrefix () const
void setParent (State *parent)
StategetParent ()
void resetParent ()
virtual void loadSettings (const Settings &settings)
virtual void saveSettings (Settings &settings) const
virtual void getAvailableInitialStateNestedNames (std::set< NestedName > &nestedNames) const
virtual bool setInitialStateByNestedName (const NestedName &nestedName)
virtual bool isConsistent (std::vector< std::string > &inconsistencies) const
std::string execute ()
virtual std::string midExecution ()=0
bool isRunning () const
void requestPause ()
virtual bool requestPauseAfterExecution ()
virtual void recallPauseAfterExecution ()
virtual bool pauseAfterExecutionRequested ()
void requestResume ()
bool isPaused ()
virtual void requestPreempt ()
virtual void recallPreempt ()
void servicePreempt ()
bool preemptRequested () const
void sleepOnce ()
void sleepWhilePaused ()
virtual Progress getProgress ()
virtual std::map< NestedName, ProgressgetRunningStates (const bool ignoreBackgroundStates)
void printStateHierarchy ()
virtual void printStateHierarchy (const bool useNestedNames, const bool useIndentation, const unsigned int indentation) const

Additional Inherited Members

- Static Public Member Functions inherited from state_machine::State
static double getTimeStep ()
- Protected Member Functions inherited from state_machine::State
void setId ()
virtual void preExecution ()
virtual void postExecution ()
void sleep (const double duration)
- Protected Member Functions inherited from state_machine_ros::RosInterface
 RosInterface (ros::NodeHandle &nodeHandle, std::string stateName)
virtual ~RosInterface ()=default
- Protected Attributes inherited from state_machine::State
ContextPtr context_
std::string name_
std::string type_
std::set< std::string > outcomes_
unsigned int id_ = -1
std::string keyPrefix_
Stateparent_ = nullptr
std::atomic< bool > isRunning_
std::atomic< bool > preemptRequested_
Progress progress_
- Protected Attributes inherited from state_machine_ros::RosInterface
ros::NodeHandle & nodeHandle_
const std::string stateName_
- Static Protected Attributes inherited from state_machine::State
static std::mutex freeIdMutex_
static int freeId_ = 0
static double timeStep_ = 0.1
static std::atomic< bool > isPaused_
- Static Protected Attributes inherited from state_machine_ros::RosInterface
static bool isSimulation_

Constructor & Destructor Documentation

◆ StateRos()

state_machine_ros::StateRos::StateRos ( ros::NodeHandle &  nodeHandle,
state_machine::ContextPtr  context,
std::string  name,
const std::set< std::string > &  outcomes 

◆ ~StateRos()

state_machine_ros::StateRos::~StateRos ( )

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