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

DC_DummyCriticalTelecommand Class Reference

#include <DC_DummyCriticalTelecommand.h>

Inheritance diagram for DC_DummyCriticalTelecommand:

CriticalTelecommand Telecommand PunctualAction CC_RootObject List of all members.

Detailed Description

Dummy telecommand that increments a counter every time it is executed.

This telecommand is useful for testing purposes. The telecommand maintains an execution counter that is initialized to zero when the telecommand object is first instantiated and is incremented by one every time the telecommand receives an execute request. There is no way to reset the execution counter.

The telecommand offers a method to change the return value of its execution check and of its validity check. These are useful to simulate telecommands whose execution check returns "telecommand cannot executed" or whose validity check returns "telecommand not valid".

Author:
Roberto Totaro
Version:
1.0

Definition at line 33 of file DC_DummyCriticalTelecommand.h.

Public Member Functions

 DC_DummyCriticalTelecommand (void)
 Instantiate a dummy telecommand.

unsigned int getNumberOfExecutions (void)
 Getter method for numberOfExecutions.

virtual bool isImageValid (void)
 The base class default implementation is overridden in order to be able to thoroughly test canExecute().

void setImageValidity (bool isValid)
 Setter method for imageValid.


Protected Member Functions

virtual TD_ActionOutcome doCriticalAction (void)
 Increments numberOfExecutions and returns a code of "action successful".


Constructor & Destructor Documentation

DC_DummyCriticalTelecommand::DC_DummyCriticalTelecommand void   ) 
 

Instantiate a dummy telecommand.

The execution counter is set to zero. The telecommand is configured to have an execution check that returns: "telecommand can executed" and a validity check that returns: "telecommand is valid".

Definition at line 15 of file DC_DummyCriticalTelecommand.cpp.


Member Function Documentation

TD_ActionOutcome DC_DummyCriticalTelecommand::doCriticalAction void   )  [protected, virtual]
 

Increments numberOfExecutions and returns a code of "action successful".

See also:
getNumberOfExecutions

CriticalTelecommand::doAction

Returns:
always returns a "telecommand successfully executed" code

Implements CriticalTelecommand.

Definition at line 22 of file DC_DummyCriticalTelecommand.cpp.

unsigned int DC_DummyCriticalTelecommand::getNumberOfExecutions void   ) 
 

Getter method for numberOfExecutions.

Used only for testing purposes.

See also:
doCriticalAction
Returns:
the number of times doCriticalAction() has been called

Definition at line 28 of file DC_DummyCriticalTelecommand.cpp.

bool DC_DummyCriticalTelecommand::isImageValid void   )  [virtual]
 

The base class default implementation is overridden in order to be able to thoroughly test canExecute().

This method returns the value of the imageValid member variable.

See also:
CriticalTelecommand::canExecute

setImageValidity

Returns:
the value of imageValid

Reimplemented from CriticalTelecommand.

Definition at line 32 of file DC_DummyCriticalTelecommand.cpp.

void DC_DummyCriticalTelecommand::setImageValidity bool  isValid  ) 
 

Setter method for imageValid.

Used only for testing purposes.

See also:
isImageValid
Parameters:
isValid new value of imageValid

Definition at line 36 of file DC_DummyCriticalTelecommand.cpp.


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