XF Test Bench 3.3
Protected Types | Protected Member Functions | Protected Attributes | List of all members
StateMachine04b Class Reference

#include <statemachine04b.h>

Inheritance diagram for StateMachine04b:
Inheritance graph
Collaboration diagram for StateMachine04b:
Collaboration graph

Protected Types

enum  eTimeoutId { Timeout_WAIT_id = 1 }
 
enum  eMainState { STATE_UNKOWN = 0 , STATE_INITIAL = 1 , STATE_WAIT = 2 }
 

Protected Member Functions

XFEventStatus processEvent () override
 
bool isTimeoutEvent (int timeoutId)
 Returns true in case state machine is currently processing a timeout.
 
bool isRestartEvent () const
 Returns true in case state machine is currently processing an evRestart event.
 

Protected Attributes

eMainState currentState_
 Attribute indicating currently active state.
 
int timeout_
 Timeout attribute counting rised timeouts in state machine.
 

Detailed Description

Implements a state machine timeouting every second. It shows how many times the timeout has expired (using a timeout_ attribute). The state machine can be reset by sending an evRestart event.

Following you will find the state machine implemented by StateMachine04b:

State Machine implemented by StateMachine04

Member Enumeration Documentation

◆ eMainState

Enumeration used to have a unique identifier for every state in the state machine.

Enumerator
STATE_UNKOWN 

Unkown state.

STATE_INITIAL 

Initial state.

STATE_WAIT 

Wait for timeout state.

◆ eTimeoutId

Timeout identifier(s) for this state machine

Enumerator
Timeout_WAIT_id 

Timeout id for WAIT.

Member Function Documentation

◆ processEvent()

XFEventStatus StateMachine04b::processEvent ( )
overrideprotected

Implements state machine behavior.


The documentation for this class was generated from the following files: