gusimplewhiteboard
guWhiteboard::FSMControlStatus Class Reference

Class for controlling and getting the status of FSMs. More...

#include <FSMControlStatus.hpp>

Inheritance diagram for guWhiteboard::FSMControlStatus:
Collaboration diagram for guWhiteboard::FSMControlStatus:

Public Member Functions

 FSMControlStatus (FSMControlType t=FSMStatus)
 designated constructor More...
 
 FSMControlStatus (const FSMControlStatus &other)
 copy constructor More...
 
const FSMControlStatusoperator= (const FSMControlStatus &other)
 assignment operator More...
 
FSMControlType command () const
 command getter More...
 
void set_command (FSMControlType command)
 command setter More...
 
bool get (int fsm) const
 machine status setter More...
 
void set (int fsm)
 machine control/status setter More...
 
void clr (int fsm)
 machine control/status clearer More...
 
void set (int fsm, bool value)
 machine control/status setter / clearer More...
 
void reset ()
 clear all machines and reset back to status More...
 
bool operator== (const FSMControlStatus &other) const
 comparison operator More...
 
 FSMControlStatus (const std::string &names)
 string constructor More...
 
std::string description () const
 convert to a string More...
 
void from_string (const std::string &str)
 convert from a string More...
 
- Public Member Functions inherited from wb_fsm_control_status
 ARRAY_PROPERTY (uint8_t, fsms,(sizeof(gu_simple_message))) wb_fsm_control_status(guWhiteboard
 bit vector of FSMs and command More...
 

Detailed Description

Class for controlling and getting the status of FSMs.

This is implemented as a bit vector with an enum for control and one bit per FSM.

Definition at line 82 of file FSMControlStatus.hpp.

Constructor & Destructor Documentation

◆ FSMControlStatus() [1/3]

guWhiteboard::FSMControlStatus::FSMControlStatus ( FSMControlType  t = FSMStatus)
inline

designated constructor

Definition at line 86 of file FSMControlStatus.hpp.

References set_command().

◆ FSMControlStatus() [2/3]

guWhiteboard::FSMControlStatus::FSMControlStatus ( const FSMControlStatus other)
inline

copy constructor

Definition at line 89 of file FSMControlStatus.hpp.

◆ FSMControlStatus() [3/3]

guWhiteboard::FSMControlStatus::FSMControlStatus ( const std::string &  names)
inline

string constructor

Definition at line 120 of file FSMControlStatus.hpp.

References from_string().

Member Function Documentation

◆ clr()

void guWhiteboard::FSMControlStatus::clr ( int  fsm)
inline

machine control/status clearer

Definition at line 107 of file FSMControlStatus.hpp.

References CONTROLSTATUS_CLR_FSM.

Referenced by set().

◆ command()

FSMControlType guWhiteboard::FSMControlStatus::command ( ) const
inline

command getter

Definition at line 95 of file FSMControlStatus.hpp.

References CONTROLSTATUS_GET_CMD.

Referenced by description(), and set_command().

◆ description()

std::string guWhiteboard::FSMControlStatus::description ( ) const
inline

convert to a string

Definition at line 123 of file FSMControlStatus.hpp.

References command(), CONTROLSTATUS_GET_FSM, and CONTROLSTATUS_NUM_FSMS.

◆ from_string()

void guWhiteboard::FSMControlStatus::from_string ( const std::string &  str)
inline

convert from a string

Definition at line 135 of file FSMControlStatus.hpp.

References CONTROLSTATUS_BIT_SIZE, CONTROLSTATUS_SET_FSM, and set_command().

Referenced by FSMControlStatus().

◆ get()

bool guWhiteboard::FSMControlStatus::get ( int  fsm) const
inline

machine status setter

Definition at line 101 of file FSMControlStatus.hpp.

References CONTROLSTATUS_GET_FSM.

◆ operator=()

const FSMControlStatus & guWhiteboard::FSMControlStatus::operator= ( const FSMControlStatus other)
inline

assignment operator

Definition at line 92 of file FSMControlStatus.hpp.

◆ operator==()

bool guWhiteboard::FSMControlStatus::operator== ( const FSMControlStatus other) const
inline

comparison operator

Definition at line 116 of file FSMControlStatus.hpp.

◆ reset()

void guWhiteboard::FSMControlStatus::reset ( )
inline

clear all machines and reset back to status

Definition at line 113 of file FSMControlStatus.hpp.

◆ set() [1/2]

void guWhiteboard::FSMControlStatus::set ( int  fsm)
inline

machine control/status setter

Definition at line 104 of file FSMControlStatus.hpp.

References CONTROLSTATUS_SET_FSM.

◆ set() [2/2]

void guWhiteboard::FSMControlStatus::set ( int  fsm,
bool  value 
)
inline

machine control/status setter / clearer

Definition at line 110 of file FSMControlStatus.hpp.

References clr(), and set().

Referenced by set().

◆ set_command()

void guWhiteboard::FSMControlStatus::set_command ( FSMControlType  command)
inline

command setter

Definition at line 98 of file FSMControlStatus.hpp.

References command(), and CONTROLSTATUS_SET_CMD.

Referenced by FSMControlStatus(), and from_string().


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