Robot Devastation
Public Member Functions | Static Public Attributes | Private Attributes | List of all members

Dummy State for testing. More...

#include <MockState.hpp>

Inheritance diagram for rd::MockState:
rd::State

Public Member Functions

 MockState (int id)
 Creates a MockState and assigns it an id.
 
virtual bool setup ()
 Sets an internal variable indicating that this function has been called.
 
virtual bool loop ()
 Sets an internal variable indicating that this function has been called.
 
virtual bool cleanup ()
 Sets an internal variable indicating that this function has been called.
 
virtual int evaluateConditions ()
 Returns the internal variable value as condition evaluation result.
 
virtual bool read (yarp::os::ConnectionReader &connection)
 Reads an incoming message that changes the internal state of the State.
 
- Public Member Functions inherited from rd::State
const std::string & getStateId () const
 Returns the string that identifies the state.
 

Static Public Attributes

static const int STATE_INITIAL = 0
 Indicates that the State has been initialized.
 
static const int STATE_SETUP = 1
 Indicates that the State has called setup()
 
static const int STATE_LOOP = 2
 Indicates that the State has called loop()
 
static const int STATE_CLEANUP = 4
 Indicates that the State has called cleanup()
 
static const int REQUEST_STATE = 0
 Request identifier for RPC communication.
 

Private Attributes

int id
 
int internal_variable
 
int state_history
 Bitmask that stores the execution flow stages this State has passed through.
 

Additional Inherited Members

- Static Public Member Functions inherited from rd::State
static StategetEndState ()
 
- Protected Attributes inherited from rd::State
std::string state_id
 Name of the current state.
 

Detailed Description

Behavior:


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