XF Test Bench 3.3
statemachine01.h
1#ifndef STATEMACHINE01_H
2#define STATEMACHINE01_H
3
4#include "xf/behavior.h"
5#include <string>
6
7using namespace std;
8
18class StateMachine01 : public XFBehavior
19{
20public:
21 StateMachine01(int repeatInterval, string text);
22 ~StateMachine01() override;
23
24protected:
25 XFEventStatus processEvent() override;
26
27 inline int getRepeatInterval() const { return repeatInterval_; }
28 inline string getText() const { return text_; }
29
30protected:
34 typedef enum
35 {
38
43 typedef enum
44 {
49
51
53 string text_;
54};
55
56#endif // STATEMACHINE01_H
Definition: statemachine01.h:19
int repeatInterval_
Interval in milliseconds to repeat text in state machine.
Definition: statemachine01.h:52
eTimeoutId
Definition: statemachine01.h:35
@ Timeout_SAY_HELLO_id
Timeout id for WAIT.
Definition: statemachine01.h:36
StateMachine01(int repeatInterval, string text)
Definition: statemachine01.cpp:11
string text_
Text to display in state machine state.
Definition: statemachine01.h:53
int getRepeatInterval() const
Returns repeat interval. Accessor for #_repeatInterval.
Definition: statemachine01.h:27
eMainState
Definition: statemachine01.h:44
@ STATE_UNKNOWN
Unknown state.
Definition: statemachine01.h:45
@ STATE_SAY_HELLO
Say hello state.
Definition: statemachine01.h:47
@ STATE_INITIAL
Initial state.
Definition: statemachine01.h:46
string getText() const
Returns text. Accessor for #_text.
Definition: statemachine01.h:28
eMainState currentState_
Attribute indicating currently active state.
Definition: statemachine01.h:50
XFEventStatus processEvent() override
Remplementation from XFBehavior.
Definition: statemachine01.cpp:23