XF Test Bench 3.3

statemachine05b.h
1#ifndef STATEMACHINE05B_H
2#define STATEMACHINE05B_H
3
4#include <string>
5#include "xf/behavior.h"
6
18 class StateMachine05b : public XFBehavior
19{
20 public:
21 StateMachine05b(std::string text);
22 ~StateMachine05b() override;
23
24 protected:
25 XFEventStatus processEvent() override;
26
27 inline std::string getText() const { return text_; }
28
29 protected:
33 typedef enum
34 {
35 Timeout_SAY_HELLO_id = 1
36 } eTimeoutId;
37
42 typedef enum
43 {
44 STATE_UNKNOWN = 0,
45 STATE_INITIAL = 1,
46 STATE_SAY_TEXT = 2
47 } eMainState;
48
49 eMainState currentState_;
50
51 std::string text_;
52};
53
54#endif // STATEMACHINE05B_H
StateMachine05b
Definition: statemachine05b.h:19
StateMachine05b::processEvent
XFEventStatus processEvent() override
Remplementation from XFReactive.
Definition: statemachine05b.cpp:21
StateMachine05b::eMainState
eMainState
Definition: statemachine05b.h:43
StateMachine05b::STATE_UNKNOWN
@ STATE_UNKNOWN
Unknown state.
Definition: statemachine05b.h:44
StateMachine05b::STATE_SAY_TEXT
@ STATE_SAY_TEXT
Say "text" state.
Definition: statemachine05b.h:46
StateMachine05b::STATE_INITIAL
@ STATE_INITIAL
Initial state.
Definition: statemachine05b.h:45
StateMachine05b::eTimeoutId
eTimeoutId
Definition: statemachine05b.h:34
StateMachine05b::Timeout_SAY_HELLO_id
@ Timeout_SAY_HELLO_id
Timeout id for WAIT.
Definition: statemachine05b.h:35
StateMachine05b::currentState_
eMainState currentState_
Attribute indicating currently active state.
Definition: statemachine05b.h:49
StateMachine05b::text_
std::string text_
Text to display in state machine state.
Definition: statemachine05b.h:51
StateMachine05b::StateMachine05b
StateMachine05b(std::string text)
Definition: statemachine05b.cpp:10
StateMachine05b::getText
std::string getText() const
Returns text. Accessor for #_text.
Definition: statemachine05b.h:27