#include <TelemetryListModeManager.h>
Inheritance diagram for TelemetryListModeManager:
A list-based telemetry mode manager handles the set of telemetry packets in a telemetry mode manager as a statically defined linear list. The mode manager maintains several such lists, one for each operational mode.
At any given time, one list is the current list (or active list). The iteration methods specified in the super class are implemented to iterate over the items in the list starting with the one with the lowest position and ending with the one with the highest position in the list.
The lists are loaded, one item at a time, when the mode manager is configured. The loading methods are: loadListLength
(to load the number items in each list) and loadItem
(to load the individual items in each list).
This class is abstract because it does not define the update mechanism for the mode manager. This must be defined by concrete subclasses. An initialization sequence for this class consists of the following steps (to be performed in the order given):
setNumberOfModes
setDefaultMode
setListLength
setListItem
reset
Definition at line 56 of file TelemetryListModeManager.h.
Public Member Functions | |
virtual TelemetryPacket * | getIterationTelemetryPacket (void) |
Retrieve the telemetry packet currently scanned by the iteration counter. | |
void | setListItem (unsigned int n, unsigned int pos, TelemetryPacket *pItem) |
Load an item in a list. | |
TelemetryListModeManager (void) | |
Instantiate a telemetry list mode manager component. | |
void | setListLength (unsigned int n, unsigned int length) |
Set the size of the n-th list. | |
virtual void | first (void) |
Iteration method to iterate through the telemetry packets in the current list. | |
virtual void | next (void) |
Iteration method to be used in conjunction with methods first and isIterationFinished . | |
virtual bool | isIterationFinished (void) |
Iteration method to be used in conjunction with methods first and next . | |
virtual bool | isObjectConfigured (void) |
Perform a class-specific configuration check on a telemetry list mode manager: verify that all the lists have been initialized and that all the items have been loaded. | |
Protected Member Functions | |
virtual void | allocateMemory (TD_Mode numberOfModes) |
Allocate the memory for the lists. |
|
Instantiate a telemetry list mode manager component. The internal data variables are initialized to illegal values to signify that the component is not yet configured. Definition at line 18 of file TelemetryListModeManager.cpp. |
|
Allocate the memory for the lists.
The newly allocated memory is initialized with pNULL. Note that this method cannot allocate all the memory required by a list mode manager because this also depends on the number of items in each list. This number is loaded with method:
This method is called by method This is an initialization method. It should only be called once. The number of modes should be greater than zero.
Implements ModeManager. Definition at line 25 of file TelemetryListModeManager.cpp. |
|
Iteration method to iterate through the telemetry packets in the current list.
This method should be used jointly with methods:
This class internally maintains an iteration counter. During an iteration cycle, the iteration counter is incremented from zero to (N-1) where N is number of items in the iteration list. Method Thus, a typical iteration cycle might be organized as follows: for (first(); !isIterationFinished(); next()) { pItem = getIterationTelemetryPacket(); . . . // process pItem } Implements TelemetryModeManager. Definition at line 63 of file TelemetryListModeManager.cpp. |
|
Retrieve the telemetry packet currently scanned by the iteration counter. This method returns the counter-th item in the iteration list where "counter" is the iteration counter. This method should only be used within an iteration cycle. However, it is guaranteed to return a reference to a list item at all times.
Implements TelemetryModeManager. Definition at line 79 of file TelemetryListModeManager.cpp. |
|
Iteration method to be used in conjunction with methods
This method should only be used as part of an iteration cycle. The result of calling it before ever calling
Implements TelemetryModeManager. Definition at line 74 of file TelemetryListModeManager.cpp. |
|
Perform a class-specific configuration check on a telemetry list mode manager: verify that all the lists have been initialized and that all the items have been loaded.
Reimplemented from ModeManager. Definition at line 86 of file TelemetryListModeManager.cpp. |
|
Iteration method to be used in conjunction with methods
Implements TelemetryModeManager. Definition at line 69 of file TelemetryListModeManager.cpp. |
|
Load an item in a list.
The item
Definition at line 50 of file TelemetryListModeManager.cpp. |
|
Set the size of the n-th list. The n-th list is the list that is active in the n-th operational mode. A call to this method causes memory to be allocated to store the items in the n-th list. The newly allocated memory is initialized to pNULL. This is an initialization method. It should only be called once.
Definition at line 38 of file TelemetryListModeManager.cpp. |