Embedded Template Library 1.0
etl::state_chart_ctp< TObject, TParameter, TObject_Ref, Transition_Table_Begin, Transition_Table_Size, State_Table_Begin, State_Table_Size, Initial_State > Class Template Reference

#include <state_chart.h>

Public Types

typedef TParameter parameter_t
 
typedef state_chart_traits::state_id_t state_id_t
 
typedef state_chart_traits::event_id_t event_id_t
 
typedef state_chart_traits::transition< TObject, parameter_t > transition
 
typedef state_chart_traits::state< TObject > state
 
- Public Types inherited from etl::istate_chart< TParameter >
typedef TParameter parameter_t
 
typedef state_chart_traits::state_id_t state_id_t
 
typedef state_chart_traits::event_id_t event_id_t
 

Public Member Functions

ETL_CONSTEXPR state_chart_ctp ()
 Constructor.
 
TObject & get_object ()
 
const TObject & get_object () const
 
virtual void start (bool on_entry_initial=true) ETL_OVERRIDE
 Start the state chart. More...
 
virtual void process_event (event_id_t event_id, parameter_t data) ETL_OVERRIDE
 
- Public Member Functions inherited from etl::istate_chart< TParameter >
 istate_chart (state_id_t initial_state_id)
 
virtual void start (bool on_entry_initial=true)=0
 
virtual void process_event (event_id_t, parameter_t)=0
 
state_id_t get_state_id () const
 

Additional Inherited Members

- Protected Attributes inherited from etl::istate_chart< TParameter >
state_id_t current_state_id
 The current state id.
 

Detailed Description

template<typename TObject, typename TParameter, TObject & TObject_Ref, const etl::state_chart_traits::transition< TObject, TParameter > * Transition_Table_Begin, size_t Transition_Table_Size, const etl::state_chart_traits::state< TObject > * State_Table_Begin, size_t State_Table_Size, etl::state_chart_traits::state_id_t Initial_State>
class etl::state_chart_ctp< TObject, TParameter, TObject_Ref, Transition_Table_Begin, Transition_Table_Size, State_Table_Begin, State_Table_Size, Initial_State >

Simple Finite State Machine Compile time tables. Event has parameter.

Member Function Documentation

◆ get_object() [1/2]

template<typename TObject , typename TParameter , TObject & TObject_Ref, const etl::state_chart_traits::transition< TObject, TParameter > * Transition_Table_Begin, size_t Transition_Table_Size, const etl::state_chart_traits::state< TObject > * State_Table_Begin, size_t State_Table_Size, etl::state_chart_traits::state_id_t Initial_State>
TObject & etl::state_chart_ctp< TObject, TParameter, TObject_Ref, Transition_Table_Begin, Transition_Table_Size, State_Table_Begin, State_Table_Size, Initial_State >::get_object ( )
inline

Gets a const reference to the implementation object.

Returns
Const reference to the implementation object.

◆ get_object() [2/2]

template<typename TObject , typename TParameter , TObject & TObject_Ref, const etl::state_chart_traits::transition< TObject, TParameter > * Transition_Table_Begin, size_t Transition_Table_Size, const etl::state_chart_traits::state< TObject > * State_Table_Begin, size_t State_Table_Size, etl::state_chart_traits::state_id_t Initial_State>
const TObject & etl::state_chart_ctp< TObject, TParameter, TObject_Ref, Transition_Table_Begin, Transition_Table_Size, State_Table_Begin, State_Table_Size, Initial_State >::get_object ( ) const
inline

Gets a const reference to the implementation object.

Returns
Const reference to the implementation object.

◆ process_event()

template<typename TObject , typename TParameter , TObject & TObject_Ref, const etl::state_chart_traits::transition< TObject, TParameter > * Transition_Table_Begin, size_t Transition_Table_Size, const etl::state_chart_traits::state< TObject > * State_Table_Begin, size_t State_Table_Size, etl::state_chart_traits::state_id_t Initial_State>
virtual void etl::state_chart_ctp< TObject, TParameter, TObject_Ref, Transition_Table_Begin, Transition_Table_Size, State_Table_Begin, State_Table_Size, Initial_State >::process_event ( event_id_t  event_id,
parameter_t  data 
)
inlinevirtual

Processes the specified event. The state machine will action the first item in the transition table that satisfies the conditions for executing the action.

Parameters
event_idThe id of the event to process.

Implements etl::istate_chart< TParameter >.

◆ start()

template<typename TObject , typename TParameter , TObject & TObject_Ref, const etl::state_chart_traits::transition< TObject, TParameter > * Transition_Table_Begin, size_t Transition_Table_Size, const etl::state_chart_traits::state< TObject > * State_Table_Begin, size_t State_Table_Size, etl::state_chart_traits::state_id_t Initial_State>
virtual void etl::state_chart_ctp< TObject, TParameter, TObject_Ref, Transition_Table_Begin, Transition_Table_Size, State_Table_Begin, State_Table_Size, Initial_State >::start ( bool  on_entry_initial = true)
inlinevirtual

Start the state chart.

Implements etl::istate_chart< TParameter >.


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