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

DC_DummyTelecommandLoader Class Reference

#include <DC_DummyTelecommandLoader.h>

Inheritance diagram for DC_DummyTelecommandLoader:

TelecommandLoader CC_RootObject List of all members.

Detailed Description

Dummy telecommand loader that is useful for testing purposes.

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.

See also:
DC_DummyTelecommand

CC_TelecommandManager

Author:
Alessandro Pasetti (P&P Software GmbH)
Version:
1.0

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.


Constructor & Destructor Documentation

DC_DummyTelecommandLoader::DC_DummyTelecommandLoader void   ) 
 

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.


Member Function Documentation

void DC_DummyTelecommandLoader::activate void   )  [virtual]
 

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.

unsigned int DC_DummyTelecommandLoader::getAllocationCounter void   ) 
 

Getter method for allocation counter.

Returns:
the allocation counter

Definition at line 52 of file DC_DummyTelecommandLoader.cpp.

bool DC_DummyTelecommandLoader::isObjectConfigured void   )  [virtual]
 

Perform a class-specific configuration check on the dummy telecommand loader: verify that the sample telecommands have been loaded.

Returns:
true if the telecommand loader is configured, false otherwise.

Reimplemented from TelecommandLoader.

Definition at line 57 of file DC_DummyTelecommandLoader.cpp.

void DC_DummyTelecommandLoader::release Telecommand pTelecommand  )  [virtual]
 

Decrement the allocation counter by 1.

Parameters:
pTelecommand the telecommand whose resources must be released

Implements TelecommandLoader.

Definition at line 40 of file DC_DummyTelecommandLoader.cpp.

void DC_DummyTelecommandLoader::setSampleTelecommand unsigned int  i,
Telecommand pSampleTc
 

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.

Parameters:
i the sample telecommand index
pSampleTc the sample telecommand to be loaded in the i-th position

Definition at line 46 of file DC_DummyTelecommandLoader.cpp.


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