XF Test Bench 3.3

statemachine02.h
1#ifndef STATEMACHINE02_H
2#define STATEMACHINE02_H
3
4#include <string>
5#include "xf/behavior.h"
6
16 class StateMachine02 : public XFBehavior
17{
18 public:
19 StateMachine02();
20 ~StateMachine02() override;
21
22 protected:
23 XFEventStatus processEvent() override;
24
25 protected:
29 typedef enum
30 {
31 Timeout_PRINT_COUNT_id = 1
32 } eTimeoutId;
33
38 typedef enum
39 {
40 STATE_UNKOWN = 0,
41 STATE_INITIAL = 1,
42 STATE_PRINT_COUNT = 2,
43 STATE_CONDITION_01 = 3,
44 STATE_TERMINATION_01 = 4
45 } eMainState;
46
47 eMainState _currentState;
48
49 static uint32_t nextId;
50 const uint32_t id;
51
52 int counter;
53};
54
55#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