SMACC
Loading...
Searching...
No Matches
Namespaces | Classes | Enumerations | Functions
smacc Namespace Reference

Namespaces

namespace  client_bases
 
namespace  components
 
namespace  default_events
 
namespace  default_transition_tags
 
namespace  event_generators
 
namespace  introspection
 
namespace  state_reactors
 
namespace  utils
 

Classes

struct  AddTEventType
 
class  CallbackCounterSemaphore
 
class  CbServiceServerCallbackBase
 
class  CbSubscriptionCallbackBase
 
class  ClientHandler
 
struct  ComponentKey
 
struct  EvCbFailure
 
struct  EvCbFinished
 
struct  EvCbSuccess
 
class  HasSpecificNamedOnExit
 
class  HasStandardOnExit
 
class  ISmaccClient
 
class  ISmaccClientBehavior
 
class  ISmaccComponent
 
class  ISmaccOrthogonal
 
class  ISmaccState
 
class  ISmaccStateMachine
 
class  ISmaccUpdatable
 
class  Orthogonal
 
class  SignalDetector
 
class  SmaccAsyncClientBehavior
 
class  SmaccClientBehavior
 
class  SmaccEventGenerator
 
class  SmaccSignal
 
class  SmaccState
 
struct  SmaccStateMachineBase
 State Machine. More...
 
class  StateReactor
 
class  Transition
 

Enumerations

enum class  SMRunMode { DEBUG , RELEASE }
 
enum class  ExecutionModel { SINGLE_THREAD_SPINNER , ASYNCHRONOUS_SPINNER }
 
enum class  EventLifeTime { ABSOLUTE , CURRENT_STATE }
 
enum class  StateMachineInternalAction {
  STATE_CONFIGURING , STATE_ENTERING , STATE_STEADY , STATE_EXITING ,
  TRANSITIONING
}
 

Functions

template<typename TState , typename TTransitionTagName >
void specificNamedOnExit (TState &st, TTransitionTagName tn, std::true_type)
 
template<typename TState , typename TTransitionTagName >
void specificNamedOnExit (TState &, TTransitionTagName tn, std::false_type)
 
template<typename TState , typename TTransitionTagName >
void specificNamedOnExit (TState &m, TTransitionTagName tn)
 
template<typename TState >
void standardOnExit (TState &st, std::true_type)
 
template<typename TState >
void standardOnExit (TState &, std::false_type)
 
template<typename TState >
void standardOnExit (TState &m)
 
template<typename StateMachineType >
void run (ExecutionModel executionModel=ExecutionModel::SINGLE_THREAD_SPINNER)
 

Enumeration Type Documentation

◆ EventLifeTime

enum class smacc::EventLifeTime
strong
Enumerator
ABSOLUTE 
CURRENT_STATE 

Definition at line 34 of file smacc_state_machine.h.

34 {
36 CURRENT_STATE /*events are discarded if we are leaving the state it were created. I is used for client behaviors whose lifetime is associated to state*/
37};

◆ ExecutionModel

enum class smacc::ExecutionModel
strong
Enumerator
SINGLE_THREAD_SPINNER 
ASYNCHRONOUS_SPINNER 

Definition at line 14 of file smacc_signal_detector.h.

◆ SMRunMode

enum class smacc::SMRunMode
strong
Enumerator
DEBUG 
RELEASE 

Definition at line 43 of file common.h.

◆ StateMachineInternalAction

Enumerator
STATE_CONFIGURING 
STATE_ENTERING 
STATE_STEADY 
STATE_EXITING 
TRANSITIONING 

Definition at line 39 of file smacc_state_machine.h.

Function Documentation

◆ run()

template<typename StateMachineType >
void smacc::run ( ExecutionModel  executionModel = ExecutionModel::SINGLE_THREAD_SPINNER)

Definition at line 94 of file smacc_signal_detector.h.

95{
96 // create the asynchronous state machine scheduler
97 SmaccFifoScheduler scheduler1(true);
98
99 // create the signalDetector component
100 SignalDetector signalDetector(&scheduler1, executionModel);
101
102 // create the asynchronous state machine processor
103 SmaccFifoScheduler::processor_handle sm = scheduler1.create_processor<StateMachineType>(&signalDetector);
104
105 // initialize the asynchronous state machine processor
106 signalDetector.setProcessorHandle(sm);
107
108 scheduler1.initiate_processor(sm);
109
110 // create a thread for the asynchronous state machine processor execution
111 boost::thread otherThread(boost::bind(&sc::fifo_scheduler<>::operator(), &scheduler1, 0));
112
113 // use the main thread for the signal detector component (waiting actionclient requests)
114 signalDetector.pollingLoop();
115 scheduler1.terminate();
116 otherThread.join();
117}
boost::statechart::fifo_scheduler< SmaccFifoWorker, SmaccAllocator > SmaccFifoScheduler

References smacc::SignalDetector::pollingLoop(), and smacc::SignalDetector::setProcessorHandle().

Here is the call graph for this function:

◆ specificNamedOnExit() [1/3]

template<typename TState , typename TTransitionTagName >
void smacc::specificNamedOnExit ( TState &  ,
TTransitionTagName  tn,
std::false_type   
)

Definition at line 30 of file state_traits.h.

31 {
32 }

◆ specificNamedOnExit() [2/3]

template<typename TState , typename TTransitionTagName >
void smacc::specificNamedOnExit ( TState &  m,
TTransitionTagName  tn 
)

Definition at line 35 of file state_traits.h.

36 {
38 std::integral_constant<bool, HasSpecificNamedOnExit<TState, TTransitionTagName>::value>());
39 }
void specificNamedOnExit(TState &st, TTransitionTagName tn, std::true_type)
Definition: state_traits.h:24

References specificNamedOnExit().

Here is the call graph for this function:

◆ specificNamedOnExit() [3/3]

template<typename TState , typename TTransitionTagName >
void smacc::specificNamedOnExit ( TState &  st,
TTransitionTagName  tn,
std::true_type   
)

◆ standardOnExit() [1/3]

template<typename TState >
void smacc::standardOnExit ( TState &  ,
std::false_type   
)

Definition at line 68 of file state_traits.h.

69 {
70 }

◆ standardOnExit() [2/3]

template<typename TState >
void smacc::standardOnExit ( TState &  m)

Definition at line 73 of file state_traits.h.

74 {
76 std::integral_constant<bool, HasStandardOnExit<TState>::value>());
77 }
void standardOnExit(TState &st, std::true_type)
Definition: state_traits.h:62

References standardOnExit().

Here is the call graph for this function:

◆ standardOnExit() [3/3]

template<typename TState >
void smacc::standardOnExit ( TState &  st,
std::true_type   
)

Definition at line 62 of file state_traits.h.

63 {
64 st.onExit();
65 }

Referenced by smacc::SmaccState< MostDerived, Context, InnerInitial, historyMode >::exit(), and standardOnExit().

Here is the caller graph for this function: