NimbRo ROS Soccer Package
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
state_controller.h File Reference

Implements the State Controller Library. More...

#include <boost/shared_ptr.hpp>
#include <boost/make_shared.hpp>
#include <boost/type_traits/is_base_of.hpp>
#include <boost/static_assert.hpp>
#include <cstddef>
#include <vector>
#include <string>

Go to the source code of this file.

Classes

class  statecontroller::GenState< SCClass >
 Specialises the State class using templates to take care of the most common overloads. More...
 
class  statecontroller::State
 Implements a state that a state controller can be in. More...
 
class  statecontroller::GenState< SCClass >
 Specialises the State class using templates to take care of the most common overloads. More...
 
class  statecontroller::StateQueue
 Implements a dynamic State queue. More...
 
class  statecontroller::StateController
 Base class for all state controllers. More...
 

Namespaces

 statecontroller
 This namespace defines everything that is required for the State Controller Library.
 

Macros

#define NewStateInstance   boost::make_shared
 

Typedefs

typedef boost::shared_ptr< State > statecontroller::StatePtr
 Used to represent a Boost shared pointer to a State object.
 
typedef boost::shared_ptr
< State const > 
statecontroller::StateConstPtr
 Used to represent a Boost shared pointer to a constant State object.
 
typedef std::size_t statecontroller::index_t
 Used to represent an array/vector/queue index (this MUST be an unsigned type)
 
typedef unsigned int statecontroller::cycle_t
 Used to count the number of executed state controller cycles.
 
typedef bool statecontroller::action_t
 Used to represent the state transition actions (HOLD_THIS_STATE and PROCEED_NEXT_STATE)
 
typedef int statecontroller::ret_t
 Used to represent the return codes from state controller functions.
 

Enumerations

enum  statecontroller::SCReturnID {
  statecontroller::SCR_OK = 0, statecontroller::SCR_TERMINATED, statecontroller::SCR_NULL_STATE, statecontroller::SCR_NOT_MY_STATE,
  statecontroller::SCR_BAD_CALLBACK
}
 Used to specify return values and error codes of state controller functions. More...
 

Variables

const StatePtr statecontroller::nullStatePtr = boost::shared_ptr<State>()
 Null StatePtr.
 
const index_t statecontroller::nullIndex = (index_t) -1
 Null index_t (nullIndex is guaranteed to exceed std::vector::max_size(), so there is no loss here)
 
const action_t statecontroller::HOLD_THIS_STATE = true
 Specifies that the state controller should remain in its current state in the next step, instead of advancing the queue.
 
const action_t statecontroller::PROCEED_NEXT_STATE = false
 Specifies that the state controller should advance the queue and retrieve a new State in the next step.
 

Detailed Description

Implements the State Controller Library.