XF Test Bench 3.3

statemachine04a.h
1#ifndef STATEMACHINE04A_H
2#define STATEMACHINE04A_H
3
4#include <string>
5#include "xf/behavior.h"
6
16 class StateMachine04a : public XFBehavior
17{
18 public:
19 StateMachine04a();
20 ~StateMachine04a() override;
21
22 void setNeighbour(XFBehavior * pNeighbour);
23 XFBehavior * getNeighbour() const;
24
25 protected:
26 XFEventStatus processEvent() override;
27
28 protected:
32 typedef enum
33 {
34 Timeout_WAIT_id = 1
35 } eTimeoutId;
36
41 typedef enum
42 {
43 STATE_UNKOWN = 0,
44 STATE_INITIAL = 1,
45 STATE_WAIT = 2,
46 STATE_SEND_RESTART = 3
47 } eMainState;
48
49 eMainState currentState_;
50
51 XFBehavior * pNeighbour_;
52};
53
54#endif // STATEMACHINE04A_H
StateMachine04a
Definition: statemachine04a.h:17
StateMachine04a::pNeighbour_
XFBehavior * pNeighbour_
Association to the neigbour state machine.
Definition: statemachine04a.h:51
StateMachine04a::processEvent
XFEventStatus processEvent() override
Definition: statemachine04a.cpp:38
StateMachine04a::eMainState
eMainState
Definition: statemachine04a.h:42
StateMachine04a::STATE_INITIAL
@ STATE_INITIAL
Initial state.
Definition: statemachine04a.h:44
StateMachine04a::STATE_WAIT
@ STATE_WAIT
Wait state.
Definition: statemachine04a.h:45
StateMachine04a::STATE_SEND_RESTART
@ STATE_SEND_RESTART
State sending an restart event.
Definition: statemachine04a.h:46
StateMachine04a::STATE_UNKOWN
@ STATE_UNKOWN
Unknown state.
Definition: statemachine04a.h:43
StateMachine04a::setNeighbour
void setNeighbour(XFBehavior *pNeighbour)
Definition: statemachine04a.cpp:21
StateMachine04a::StateMachine04a
StateMachine04a()
Constructor.
Definition: statemachine04a.cpp:6
StateMachine04a::getNeighbour
XFBehavior * getNeighbour() const
Definition: statemachine04a.cpp:29
StateMachine04a::eTimeoutId
eTimeoutId
Definition: statemachine04a.h:33
StateMachine04a::Timeout_WAIT_id
@ Timeout_WAIT_id
Timeout id for WAIT.
Definition: statemachine04a.h:34
StateMachine04a::currentState_
eMainState currentState_
Attribute indicating currently active state.
Definition: statemachine04a.h:49