#include <DC_DummyTelecommand.h>
Inheritance diagram for DC_DummyTelecommand:
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 offer methods to change the return value of its execution check and of its validity check and to set the values of validity and execution check codes. These are useful to simulate telecommands whose execution check returns "telecommand cannot executed" or whose validity check returns "telecommand not valid".
Definition at line 34 of file DC_DummyTelecommand.h.
Public Member Functions | |
DC_DummyTelecommand (void) | |
Instantiate a dummy telecommand. | |
unsigned int | getExecutionCounter (void) |
Getter method for the execution counter. | |
virtual bool | canExecute (void) |
Execute the execution check on the telecommand. | |
virtual bool | isValid (void) |
Execute the validity check on the telecommand. | |
virtual TD_CheckCode | getValidityCheckCode (void) const |
Return the validity check code for the telecommand. | |
virtual TD_CheckCode | getExecutionCheckCode (void) const |
Return the execution check code for the telecommand. | |
void | setExecutionCheckValue (bool executionCheckValue) |
Set the return value of the execution check. | |
void | setValidityCheckValue (bool validityCheckValue) |
Set the return value of the validity check. | |
void | setValidityCheckCode (TD_CheckCode validityCheckCode) |
Set the value of the validity check code. | |
void | setExecutionCheckCode (TD_CheckCode executionCheckCode) |
Set the value of the execution check code. | |
Protected Member Functions | |
virtual TD_ActionOutcome | doAction (void) |
Increment the execution counter by one and return a code of "action successful". |
|
Instantiate a dummy telecommand. The execution counter is set to zero. The telecommand is configured to have an execution check that returns: "telecommand can be executed" and a validity check that returns: "telecommand is valid". The validity and execution check codes are initialized to zero. Definition at line 15 of file DC_DummyTelecommand.cpp. |
|
Execute the execution check on the telecommand. A pseudo-code implementation for this method is as follows: return executionCheckValue;The internal variable executionCheckValue is initialized to TC_CANNOT_EXECUTE by the constructor but its value can be changed with method setExecutionCheckValue
Reimplemented from Telecommand. Definition at line 33 of file DC_DummyTelecommand.cpp. |
|
Increment the execution counter by one and return a code of "action successful". Note that there is no protection against an overflow in the value of the execution counter.
Implements PunctualAction. Definition at line 28 of file DC_DummyTelecommand.cpp. |
|
Return the execution check code for the telecommand.
This implementation returns a user-defined value that is set with method
Reimplemented from Telecommand. Definition at line 53 of file DC_DummyTelecommand.cpp. |
|
Getter method for the execution counter.
Definition at line 24 of file DC_DummyTelecommand.cpp. |
|
Return the validity check code for the telecommand.
This implementation returns a user-defined value that is set with method
Reimplemented from Telecommand. Definition at line 49 of file DC_DummyTelecommand.cpp. |
|
Execute the validity check on the telecommand. A pseudo-code implementation for this method is as follows: return validityCheckValue;The internal variable validityCheckValue is initialized to VALID by the constructor but its value can be changed with method setValidityCheckValue
Reimplemented from Telecommand. Definition at line 37 of file DC_DummyTelecommand.cpp. |
|
Set the value of the execution check code.
This is a setter method for an internal variable which defines the return value of method
Definition at line 61 of file DC_DummyTelecommand.cpp. |
|
Set the return value of the execution check.
This is a setter method for the internal variable
Definition at line 41 of file DC_DummyTelecommand.cpp. |
|
Set the value of the validity check code.
This is a setter method for an internal variable which defines the return value of method
Definition at line 57 of file DC_DummyTelecommand.cpp. |
|
Set the return value of the validity check.
This is a setter method for the internal variable
Definition at line 45 of file DC_DummyTelecommand.cpp. |