#include <DC_DummyTelecommandLoader.h>
Inheritance diagram for DC_DummyTelecommandLoader:
This telecommand loader can be used to help test the functionalities of the TelecommandLoader
class and of the telecommand manager component. The dummy telecommand loader manages three sample telecommands. These telecommands must be loaded when the dummy telecommand loader is configured. When the telecommand loader is activated, it loads one sample telecommand. The telecommand loader maintains an allocation counter that records the number of telecommands that are currently loaded in the telecommand manager associated to the telecommand loader. The allocation counter is incremented by one every time a telecommand is loaded into the telecommand manager and it is decremented by one every time the telecommand manager sends a release request to the telecommand loader.
Definition at line 38 of file DC_DummyTelecommandLoader.h.
Public Member Functions | |
DC_DummyTelecommandLoader (void) | |
Instantiate a dummy telecommand loader. | |
virtual void | activate (void) |
Load a sample telecommand in the telecommand manager. | |
virtual void | release (Telecommand *pTelecommand) |
Decrement the allocation counter by 1. | |
void | setSampleTelecommand (unsigned int i, Telecommand *pSampleTc) |
Load the i-th sample telecommand. | |
unsigned int | getAllocationCounter (void) |
Getter method for allocation counter. | |
virtual bool | isObjectConfigured (void) |
Perform a class-specific configuration check on the dummy telecommand loader: verify that the sample telecommands have been loaded. |
|
Instantiate a dummy telecommand loader. This constructor initializes the sample telecommands to pNULL and the allocation counter to zero. Definition at line 24 of file DC_DummyTelecommandLoader.cpp. |
|
Load a sample telecommand in the telecommand manager. A pseudo-code implementation for this method is as follows: i = allocationCounter MOD 3; load i-th sample telecommand in telecommand manager; allocationCounter++;Thus, each activation causes one sample telecommand to be loaded. The three sample telecommands are loaded in a cyclical sequence. Implements TelecommandLoader. Definition at line 33 of file DC_DummyTelecommandLoader.cpp. |
|
Getter method for allocation counter.
Definition at line 52 of file DC_DummyTelecommandLoader.cpp. |
|
Perform a class-specific configuration check on the dummy telecommand loader: verify that the sample telecommands have been loaded.
Reimplemented from TelecommandLoader. Definition at line 57 of file DC_DummyTelecommandLoader.cpp. |
|
Decrement the allocation counter by 1.
Implements TelecommandLoader. Definition at line 40 of file DC_DummyTelecommandLoader.cpp. |
|
Load the i-th sample telecommand. The maximum number of sample telecommands that can be loaded is 3. The index i must lie in the interval [0,2]. No check is performed on the value of the index i at run time.
Definition at line 46 of file DC_DummyTelecommandLoader.cpp. |