#include <DC_FromFsmEvent.h>
Inheritance diagram for DC_FromFsmEvent:
The two states across which the transition is attempted are the starting state and the target state. Both are configuration parameters for the FsmEvent. When the FsmEvent is fired, it checks whether the target FSM is in the starting state and, if it is, it makes a request for a transition to the target state. If the target FSM is not in the starting state, no action is taken.
Definition at line 32 of file DC_FromFsmEvent.h.
Public Member Functions | |
DC_FromFsmEvent (void) | |
Instantiate an FromFsmEvent object. | |
void | setStartingState (TD_FsmStateIndex startingState) |
Setter method for the starting state. | |
TD_FsmStateIndex | getStartingState (void) const |
Getter method for the starting state. | |
virtual bool | isObjectConfigured (void) |
Perform a class-specific configuration check on a repository object: verify that the starting state has been loaded and that it has a legal value. | |
Protected Member Functions | |
virtual TD_ActionOutcome | doAction (void) |
Execute the FsmEvent: lodge a request to the target FSM to perform a state transition from the starting state to the target state. |
|
Instantiate an FromFsmEvent object. Set the class identifier and initialize the starting state. The starting state is initialized to an illegal values to signify that the FromFsmEvent is not yet configured. Definition at line 18 of file DC_FromFsmEvent.cpp. |
|
Execute the FsmEvent: lodge a request to the target FSM to perform a state transition from the starting state to the target state. The request is only lodged if the FSM is in the starting state. A pseudo-code implementation for this method is as follows: if (targetFsm.getCurrentState() eq startingState) targetFsm.makeTransitionRequest(targetState); return ACTION_SUCCESS; else return ACTION_FAILURE;
Reimplemented from DC_FsmEvent. Definition at line 38 of file DC_FromFsmEvent.cpp. |
|
Getter method for the starting state.
Definition at line 28 of file DC_FromFsmEvent.cpp. |
|
Perform a class-specific configuration check on a repository object: verify that the starting state has been loaded and that it has a legal value. The legality of the starting state is checked by verifying that its value lies in the range [0,N-1] where N is the total number of states in the target FSM. Reimplemented from DC_FsmEvent. Definition at line 33 of file DC_FromFsmEvent.cpp. |
|
Setter method for the starting state. The starting state is expressed as an integer that should be in the range [0,N-1] where N is the total number of states in the target FSM. This is an initialization method.
Definition at line 23 of file DC_FromFsmEvent.cpp. |