#include <DC_NestedFsmActivatorWithExitCheck.h>
Inheritance diagram for DC_NestedFsmActivatorWithExitCheck:
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.
R. Totaro
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. |
|
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. |
|
Return true (state can be exited) if the target FSM has reached the target state.
Reimplemented from FsmState. Definition at line 33 of file DC_NestedFsmActivatorWithExitCheck.cpp. |
|
Get the target state index.
Definition at line 28 of file DC_NestedFsmActivatorWithExitCheck.cpp. |
|
Perform a class-specific configuration check: verify that the base class is configured and that the target state has been loaded.
Reimplemented from DC_NestedFsmActivator. Definition at line 38 of file DC_NestedFsmActivatorWithExitCheck.cpp. |
|
Set the target state index.
Definition at line 23 of file DC_NestedFsmActivatorWithExitCheck.cpp. |