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

TelecommandLoader Class Reference
[Telecommand Management]

#include <TelecommandLoader.h>

Inheritance diagram for TelecommandLoader:

CC_RootObject DC_BasicPUSTcLoader DC_DummyTelecommandLoader List of all members.

Detailed Description

Base class from which all telecommand loaders are derived.

A telecommand loader is an object that is responsible for receiving telecommands, decoding them and for constructing the objects of type Telecommand that represent the telecommand inside the application software.

Telecommand loaders must load a telecommand object in the telecommand manager after having constructed it. For this reason, they have the telecommand manager as a plug-in component and this class declares the corresponding method to load the telecommand manager.

During the process of constructing a telecommand object, the telecommand loader may need to allocate resources (typically memory to hold the telecommand object). These resources must be released after the telecommand has been executed. For this reason, this class declares a release method that must be called by the telecommand manager after it has executed a telecommand and that triggers the release of the resources associated to the telecommand object.

Telecommand loaders are activated when a new telecommand has (potentially) been received. Depending on the implementation, this activation could be in response to the arrival of an interrupt signaling the actual reception of a new telecommand or it could be done periodically to direct the telecommand loader to check whether a new telecommand has arrived.

This is an abstract class. Concrete telecommand loaders are obtained by deriving this class.

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

Definition at line 53 of file TelecommandLoader.h.

Public Member Functions

 TelecommandLoader (void)
 Instantiate a telecommand loader.

virtual void activate (void)=0
 Check whether a telecommand has been received and, if so, construct the Telecommand object to represent it and load it in the telecommand manager.

virtual void release (Telecommand *pTelecommand)=0
 Release the resources that the telecommand loader had allocated to the argument telecommand.

void setTelecommandManager (CC_TelecommandManager *pTcManager)
 Load the telecommand manager as a plug-in component.

CC_TelecommandManagergetTelecommandManager (void)
 Getter method for the telecommand manager plug-in component.

virtual bool isObjectConfigured (void)
 Perform a class-specific configuration check on the telecommand loader: verify that the telecommand manager has been loaded.


Constructor & Destructor Documentation

TelecommandLoader::TelecommandLoader void   ) 
 

Instantiate a telecommand loader.

This constructor initializes the telecommand manager plug-in component to point to pNULL to signify that the component has not yet been configured.

Definition at line 14 of file TelecommandLoader.cpp.


Member Function Documentation

virtual void TelecommandLoader::activate void   )  [pure virtual]
 

Check whether a telecommand has been received and, if so, construct the Telecommand object to represent it and load it in the telecommand manager.

This is an abstract method because the way in which telecommands are received and the way in which the corresponding objects are constructed is application-specific.

Implemented in DC_BasicPUSTcLoader, and DC_DummyTelecommandLoader.

CC_TelecommandManager * TelecommandLoader::getTelecommandManager void   )  [inline]
 

Getter method for the telecommand manager plug-in component.

See also:
setTelecommandManager
Returns:
the telecommand manager

Definition at line 18 of file TelecommandLoader_inl.h.

bool TelecommandLoader::isObjectConfigured void   )  [virtual]
 

Perform a class-specific configuration check on the telecommand loader: verify that the telecommand manager has been loaded.

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

Reimplemented from CC_RootObject.

Reimplemented in DC_BasicPUSTcLoader, and DC_DummyTelecommandLoader.

Definition at line 18 of file TelecommandLoader.cpp.

virtual void TelecommandLoader::release Telecommand pTelecommand  )  [pure virtual]
 

Release the resources that the telecommand loader had allocated to the argument telecommand.

This method should be called after the argument telecommand object has been executed to allow the telecommand loader to release any resources that it had allocated to the telecommand object when it created it. This method would normally be called by the telecommand manager.

See also:
CC_TelecommandManager::activate
Parameters:
pTelecommand the telecommand whose resources must be released

Implemented in DC_BasicPUSTcLoader, and DC_DummyTelecommandLoader.

void TelecommandLoader::setTelecommandManager CC_TelecommandManager pTcManager  )  [inline]
 

Load the telecommand manager as a plug-in component.

A telecommand loader needs access to the telecommand manager because it must load newly created telecommand objects in the telecommand manager.

Parameters:
pTcManager the telecommand manager

Definition at line 14 of file TelecommandLoader_inl.h.


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