gusimplewhiteboard
|
This class is for the robot to report its current state. More...
#include <NAO_State.hpp>
Public Member Functions | |
NAO_State () | |
Constructor, calls the data structs default constructor, which sets some default values. More... | |
bool | fallen () const |
Convenience method for checking the Fallen values. More... | |
NAO_State (const std::string &command) | |
string constructor (see from_string() below) More... | |
std::string | description () |
pretty print method for showing the current property values More... | |
void | from_string (const std::string &str) |
parse class properties from a string More... | |
![]() | |
PROPERTY (enum Robot_Stance, stance) PROPERTY(enum Robot_Walk | |
Currently SMRobotPosition detects if the robot has fallen over. More... | |
walk | PROPERTY (bool, chest_pressed_long) PROPERTY(bool |
chest pressed for more than half a second More... | |
walk left_foot_pressed_long | PROPERTY (bool, right_foot_pressed_long) PROPERTY(bool |
right foot pressed for more than half a second More... | |
walk left_foot_pressed_long chest_pressed | PROPERTY (bool, left_foot_pressed) PROPERTY(bool |
left foot pressed More... | |
wb_nao_state () | |
constructor More... | |
Additional Inherited Members | |
![]() | |
walk left_foot_pressed_long chest_pressed right_foot_pressed int16_t | pad |
padding More... | |
This class is for the robot to report its current state.
It is updated by various machines
NOTE: Read, Change, Write operations in state machines will not result in a race condition here. clfsm evaluates and runs states synchronously
Get the 'sticky' state of the Chest Button (worked out and updated by the SMButtonChest fsm)
NAO_State s = NAO_State_t.get(); //get from the whiteboard bool button_state = s.chest_pressed_long(); //pull the variable out of the class
Definition at line 61 of file NAO_State.hpp.
|
inline |
Constructor, calls the data structs default constructor, which sets some default values.
Definition at line 65 of file NAO_State.hpp.
|
inline |
string constructor (see from_string() below)
[in] | command | a serialised string containing properties to set in this class |
Definition at line 74 of file NAO_State.hpp.
References from_string().
|
inline |
pretty print method for showing the current property values
Definition at line 79 of file NAO_State.hpp.
|
inline |
Convenience method for checking the Fallen values.
Definition at line 68 of file NAO_State.hpp.
References FallenBack, FallenForward, FallenLeft, and FallenRight.
|
inline |
parse class properties from a string
[in] | str | a serialised string containing properties to set in this class |
Definition at line 91 of file NAO_State.hpp.
References Modded_UNSW_Walk, NUM_OF_STANCES, NUM_OF_WALKS, and Standing.
Referenced by NAO_State().