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

DC_DummyConfigurableFsmState Class Reference

#include <DC_DummyConfigurableFsmState.h>

Inheritance diagram for DC_DummyConfigurableFsmState:

FsmState CC_RootObject List of all members.

Detailed Description

Dummy configurable FsmState useful for testing purposes.

It represents an FsmState with simple actions and configurable check results. The actions associated to the FsmState consist in the incrementation of three counters: the activation counter, initialization counter and the termination counter. The checks associated to the FsmState are implemented to return user-defined values.

See also:
CC_FSM
Author:
Alessandro Pasetti (P&P Software GmbH)
Version:
1.1

Definition at line 32 of file DC_DummyConfigurableFsmState.h.

Public Member Functions

 DC_DummyConfigurableFsmState (void)
 Instantiate a dummy FsmState object, initialize all the action counters to zero, the initialization and exit check to true, and the termination check to false.

virtual void doContinue (void)
 Implement dummy continued action: the method increments the activation counter by 1 returns.

virtual bool canEnter (void)
 Return the value set by the user with the last call to setInitializationCheckValue.

virtual void doInit (void)
 Implement dummy initialization action: the method increments the initialization counter by 1 returns.

virtual bool canExit (void)
 Return the value set by the user with the last call to setExitCheckValue.

virtual void doExit (void)
 Implement dummy exit action: the method increments the exit counter by 1 returns.

virtual bool isFinished (void)
 Return the value set by the user with the last call to setTerminationCheckValue.

unsigned int getActivationCounter (void)
 Return the value of the activation counter.

unsigned int getInitializationCounter (void)
 Return the value of the initialization counter.

unsigned int getExitCounter (void)
 Return the value of the exit counter.

void setInitializationCheckValue (bool value)
 Set the return value of the initialization check.

void setExitCheckValue (bool value)
 Set the return value of the exit check.

void setTerminationCheckValue (bool value)
 Set the return value of the termination check.


Member Function Documentation

bool DC_DummyConfigurableFsmState::canEnter void   )  [virtual]
 

Return the value set by the user with the last call to setInitializationCheckValue.

See also:
CC_FSM::activate

setInitializationCheckValue

Returns:
true if the continued action associated to this state has been terminated, false otherwise

Reimplemented from FsmState.

Definition at line 43 of file DC_DummyConfigurableFsmState.cpp.

bool DC_DummyConfigurableFsmState::canExit void   )  [virtual]
 

Return the value set by the user with the last call to setExitCheckValue.

See also:
CC_FSM::activate

setExitCheckValue

Returns:
true if the continued action associated to this state has been terminated, false otherwise

Reimplemented from FsmState.

Definition at line 39 of file DC_DummyConfigurableFsmState.cpp.

void DC_DummyConfigurableFsmState::doContinue void   )  [virtual]
 

Implement dummy continued action: the method increments the activation counter by 1 returns.

See also:
FsmState::doContinue

Implements FsmState.

Definition at line 24 of file DC_DummyConfigurableFsmState.cpp.

void DC_DummyConfigurableFsmState::doExit void   )  [virtual]
 

Implement dummy exit action: the method increments the exit counter by 1 returns.

See also:
FsmState::doExit

Reimplemented from FsmState.

Definition at line 34 of file DC_DummyConfigurableFsmState.cpp.

void DC_DummyConfigurableFsmState::doInit void   )  [virtual]
 

Implement dummy initialization action: the method increments the initialization counter by 1 returns.

See also:
FsmState::doInit

Reimplemented from FsmState.

Definition at line 29 of file DC_DummyConfigurableFsmState.cpp.

unsigned int DC_DummyConfigurableFsmState::getActivationCounter void   ) 
 

Return the value of the activation counter.

Returns:
the value of the activation counter

Definition at line 51 of file DC_DummyConfigurableFsmState.cpp.

unsigned int DC_DummyConfigurableFsmState::getExitCounter void   ) 
 

Return the value of the exit counter.

Returns:
the value of the exit counter

Definition at line 59 of file DC_DummyConfigurableFsmState.cpp.

unsigned int DC_DummyConfigurableFsmState::getInitializationCounter void   ) 
 

Return the value of the initialization counter.

Returns:
the value of the initialization counter

Definition at line 55 of file DC_DummyConfigurableFsmState.cpp.

bool DC_DummyConfigurableFsmState::isFinished void   )  [virtual]
 

Return the value set by the user with the last call to setTerminationCheckValue.

See also:
CC_FSM::activate

setTerminationCheckValue

Returns:
true if the continued action associated to this state has been terminated, false otherwise

Reimplemented from FsmState.

Definition at line 47 of file DC_DummyConfigurableFsmState.cpp.

void DC_DummyConfigurableFsmState::setExitCheckValue bool  value  ) 
 

Set the return value of the exit check.

Returns:
the value that shall be returned by the next call to the exit check

Definition at line 67 of file DC_DummyConfigurableFsmState.cpp.

void DC_DummyConfigurableFsmState::setInitializationCheckValue bool  value  ) 
 

Set the return value of the initialization check.

Returns:
the value that shall be returned by the next call to the initialization check

Definition at line 63 of file DC_DummyConfigurableFsmState.cpp.

void DC_DummyConfigurableFsmState::setTerminationCheckValue bool  value  ) 
 

Set the return value of the termination check.

Returns:
the value that shall be returned by the next call to the termination check

Definition at line 71 of file DC_DummyConfigurableFsmState.cpp.


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