statemachine02.h
#ifndef STATEMACHINE02_H
#define STATEMACHINE02_H
#include <string>
#include "xf/behavior.h"
class StateMachine02 : public XFBehavior
{
public:
StateMachine02();
~StateMachine02() override;
protected:
XFEventStatus processEvent() override;
protected:
typedef enum
{
Timeout_PRINT_COUNT_id = 1
} eTimeoutId;
typedef enum
{
STATE_UNKOWN = 0,
STATE_INITIAL = 1,
STATE_PRINT_COUNT = 2,
STATE_CONDITION_01 = 3,
STATE_TERMINATION_01 = 4
} eMainState;
eMainState _currentState;
static uint32_t nextId;
const uint32_t id;
int counter;
};
#endif // STATEMACHINE02_H
StateMachine02
Definition: statemachine02.h:17
StateMachine02::nextId
static uint32_t nextId
Static attribute providing identifier for next object.
Definition: statemachine02.h:49
StateMachine02::counter
int counter
Count down attribute used in state machine.
Definition: statemachine02.h:52
StateMachine02::eTimeoutId
eTimeoutId
Definition: statemachine02.h:30
StateMachine02::Timeout_PRINT_COUNT_id
@ Timeout_PRINT_COUNT_id
Timeout id for WAIT.
Definition: statemachine02.h:31
StateMachine02::processEvent
XFEventStatus processEvent() override
Definition: statemachine02.cpp:24
StateMachine02::id
const uint32_t id
Object identifier.
Definition: statemachine02.h:50
StateMachine02::_currentState
eMainState _currentState
Attribute indicating currently active state.
Definition: statemachine02.h:47
StateMachine02::eMainState
eMainState
Definition: statemachine02.h:39
StateMachine02::STATE_INITIAL
@ STATE_INITIAL
Initial state.
Definition: statemachine02.h:41
StateMachine02::STATE_CONDITION_01
@ STATE_CONDITION_01
Condition after print count state.
Definition: statemachine02.h:43
StateMachine02::STATE_TERMINATION_01
@ STATE_TERMINATION_01
Termination state.
Definition: statemachine02.h:44
StateMachine02::STATE_PRINT_COUNT
@ STATE_PRINT_COUNT
Print count state.
Definition: statemachine02.h:42
StateMachine02::STATE_UNKOWN
@ STATE_UNKOWN
Unkown state.
Definition: statemachine02.h:40