statemachine04a.h
#ifndef STATEMACHINE04A_H
#define STATEMACHINE04A_H
#include <string>
#include "xf/behavior.h"
class StateMachine04a : public XFBehavior
{
public:
StateMachine04a();
~StateMachine04a() override;
void setNeighbour(XFBehavior * pNeighbour);
XFBehavior * getNeighbour() const;
protected:
XFEventStatus processEvent() override;
protected:
typedef enum
{
Timeout_WAIT_id = 1
} eTimeoutId;
typedef enum
{
STATE_UNKOWN = 0,
STATE_INITIAL = 1,
STATE_WAIT = 2,
STATE_SEND_RESTART = 3
} eMainState;
eMainState currentState_;
XFBehavior * pNeighbour_;
};
#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