Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

DC_NestedFsmActivatorWithExitCheck Class Reference

#include <DC_NestedFsmActivatorWithExitCheck.h>

Inheritance diagram for DC_NestedFsmActivatorWithExitCheck:

DC_NestedFsmActivator FsmState CC_RootObject List of all members.

Detailed Description

FsmState that activates an FSM.

This FsmState is useful to implement "nested FSM" where one outer FSM controls one or more "inner" FSMs. In this case, to each FsmState of the outer FSM, one of the inner FSMs is associated. The task of the FsmStates is activate their associated FSMs. This class can be used to implement one of these FsmStates.

A DC_NestedFsmActivatorWithExitCheck is configured with two parameters: the target FSM and the target state index. The target FSM is the FSM that the FsmState controls and must periodically activate. The continuation action of an DC_NestedFsmActivatorWithExitCheck consists in activating the target FSM. The FsmState thus implemented by an DC_NestedFsmActivatorWithExitCheck is a stable state that, barring any external action, never terminates.

This state performs an exit check that consists in verifying whether the target FSM has reached the target state passed as to the state as a configuration parameter.

The initialization action of the DC_NestedFsmActivatorWithEndState is implemented to reset the target FSM.

See also:
CC_FSM

DC_NestedFsmActivator

Author:
Alessandro Pasetti

R. Totaro

Version:
1.0

Definition at line 46 of file DC_NestedFsmActivatorWithExitCheck.h.

Public Member Functions

 DC_NestedFsmActivatorWithExitCheck (void)
 Set the class identifier.

void setTargetState (TD_FsmStateIndex targetState)
 Set the target state index.

TD_FsmStateIndex getTargetState (void)
 Get the target state index.

virtual bool canExit (void)
 Return true (state can be exited) if the target FSM has reached the target state.

virtual bool isObjectConfigured (void)
 Perform a class-specific configuration check: verify that the base class is configured and that the target state has been loaded.


Constructor & Destructor Documentation

DC_NestedFsmActivatorWithExitCheck::DC_NestedFsmActivatorWithExitCheck void   ) 
 

Set the class identifier.

The target state is initialized to an illegal value to signify that the object is not yet configured.

Definition at line 18 of file DC_NestedFsmActivatorWithExitCheck.cpp.


Member Function Documentation

bool DC_NestedFsmActivatorWithExitCheck::canExit void   )  [virtual]
 

Return true (state can be exited) if the target FSM has reached the target state.

See also:
FsmState::canExit
Returns:
true if the target FSM has reached the target state

Reimplemented from FsmState.

Definition at line 33 of file DC_NestedFsmActivatorWithExitCheck.cpp.

TD_FsmStateIndex DC_NestedFsmActivatorWithExitCheck::getTargetState void   ) 
 

Get the target state index.

See also:
canExit

Definition at line 28 of file DC_NestedFsmActivatorWithExitCheck.cpp.

bool DC_NestedFsmActivatorWithExitCheck::isObjectConfigured void   )  [virtual]
 

Perform a class-specific configuration check: verify that the base class is configured and that the target state has been loaded.

Returns:
true if the object is configured, false otherwise.

Reimplemented from DC_NestedFsmActivator.

Definition at line 38 of file DC_NestedFsmActivatorWithExitCheck.cpp.

void DC_NestedFsmActivatorWithExitCheck::setTargetState TD_FsmStateIndex  targetState  ) 
 

Set the target state index.

See also:
canExit

Definition at line 23 of file DC_NestedFsmActivatorWithExitCheck.cpp.


The documentation for this class was generated from the following files:
Copyright 2003 P&P Software GmbH - All Rights Reserved