#include <CC_TelemetryManager.h>
Inheritance diagram for CC_TelemetryManager:
The telemetry manager is responsible for controlling the dispatch of telemetry packets to the telemetry stream. The telemetry packets can be dispatched to the telemetry stream in two modes:
The telemetry packets are written to the telemetry stream when the telemetry stream is activated (invocation of method activate
). At this time, the telemetry packets that were directly loaded since the last activation and the telemetry packets that are provided by the telemetry mode manager are first updated and then their written to the telemetry stream.
The telemetry manager contributes to the management of the "in use" status of telemetry packets. More precisely, packets that are submitted for immediate dispatch are marked as "no longer in use" after being processed.
The telemetry stream component is a plug-in component of the telemetry manager.
The configuration procedure for a newly instantiated telemetry manager is as follows:
setTelemetryStream
). setTelemetryModeManager
). setImmediateQueueSize
).
Definition at line 70 of file CC_TelemetryManager.h.
Public Member Functions | |
CC_TelemetryManager (void) | |
Instantiate a telemetry manager. | |
void | setTelemetryModeManager (TelemetryModeManager *pTmModeManager) |
Load the telemetry mode manager. | |
TelemetryModeManager * | getTelemetryModeManager (void) const |
Get the telemetry mode manager. | |
void | setTelemetryStream (TelemetryStream *pTmStream) |
Load the telemetry stream component. | |
TelemetryStream * | getTelemetryStream (void) const |
Get the telemetry stream component. | |
void | setImmediateQueueSize (unsigned int size) |
Set the size of the immediate dispatch queue. | |
unsigned int | getImmediateQueueSize () |
Return the size of the immediate dispatch queue. | |
TelemetryPacket * | getImmediateQueueEntry (unsigned int i) |
Return the i-th entry in the immediate dispatch queue. | |
bool | isImmediateQueueFull () |
Return true if the size of the immediate dispatch queue is zero or if the immediate dispatch queue is full. | |
virtual void | activate (void) |
Dispatch the telemetry packets to the telemetry stream. | |
void | sendTelemetryPacket (TelemetryPacket *pTmPacket) |
Add the argument telemetry packet to the immediate dispatch queue. | |
void | unloadTelemetryPacket (TelemetryPacket *pTmPacket) |
Check if the argument telemetry packet is currently in the immediate dispatch queue and, if it is, remove it. | |
unsigned int | getImmediateQueueLoaded () |
Return the number of telemetry packets currently loaded in the immediate dispatch queue. | |
virtual bool | isObjectConfigured (void) |
Perform a class-specific configuration check on the telemetry manager: verify that the telemetry stream and telemetry mode manager have been loaded and that the size of the immediate load packet queue has been set. |
|
Instantiate a telemetry manager. The class identifier is set and all internal data structures are initialized to illegal values to signify that the component is not yet configured. Definition at line 20 of file CC_TelemetryManager.cpp. |
|
Dispatch the telemetry packets to the telemetry stream. Both the telemetry packets provided by the telemetry mode manager and those loaded for immediate dispatch since the last activation are written to the telemetry stream. A pseudo-code implementation for this method is as follows: for (all pTmPacket items in the immediate dispatch queue) { pTmPacket->update(); if ( !pTmPacket->isValid() ) { createEventReport(EVT_TM_WORD_NOT_VALID); pTmPacket->setInUse(false); } if ( !pTmPacket fits in telemetry stream ) createEventReport(EVT_TOO_MANY_TM_BYTES); pTmPacket->setInUse(false); } pTmStream->write(pTmPacket) pTmPacket->setInUse(false); } . . . // clear immediate dispatch queue for (all pTmPacket items provided by the telemetry mode manager) { pTmPacket->update(); if ( !pTmPacket->isValid() ) { createEventReport(EVT_TM_WORD_NOT_VALID); } if ( !pTmPacket fits in telemetry stream ) createEventReport(EVT_TOO_MANY_TM_BYTES); } pTmStream->write(pTmPacket) } pTmStream->flush();In the above pseudo-code, pTmStream is the telemetry stream where the telemetry packets are written and pTmFactory is the telemetry packet factory. Each telemetry packet is first updated and its validity is then checked. If validity is confirmed, it is checked that the packet fits in the telemetry stream. If it does, it is written to the telemetry stream. In the case of telemetry packets from the immediate dispatch queue, the packets are marked as "no longer in use" after being processed. If the telemetry packet is not valid or if it does not fit in the telemetry channel, event reports are generated. After all telemetry packets have been processed, the telemetry stream is flushed.
Definition at line 73 of file CC_TelemetryManager.cpp. |
|
Return the i-th entry in the immediate dispatch queue. The index i should lie in the range [0,N-1] where N is the size of the queue. If the value of i is out of range, a null pointer is returned. A null pointer will also be returned if the i-the entry in the queue is empty. This method is only intended for testing purposes. It should not be used in an operational context. This method may return null
Definition at line 60 of file CC_TelemetryManager.cpp. |
|
Return the number of telemetry packets currently loaded in the immediate dispatch queue.
Definition at line 155 of file CC_TelemetryManager.cpp. |
|
Return the size of the immediate dispatch queue.
Definition at line 56 of file CC_TelemetryManager.cpp. |
|
Get the telemetry mode manager.
Definition at line 33 of file CC_TelemetryManager.cpp. |
|
Get the telemetry stream component.
Definition at line 43 of file CC_TelemetryManager.cpp. |
|
Return true if the size of the immediate dispatch queue is zero or if the immediate dispatch queue is full.
Definition at line 66 of file CC_TelemetryManager.cpp. |
|
Perform a class-specific configuration check on the telemetry manager: verify that the telemetry stream and telemetry mode manager have been loaded and that the size of the immediate load packet queue has been set.
Reimplemented from CC_RootObject. Definition at line 167 of file CC_TelemetryManager.cpp. |
|
Add the argument telemetry packet to the immediate dispatch queue. The telemetry packet will be dispatched to the telemetry stream at the next activation of the telemetry manager. If the queue is already full, then an event report of type EVT_TM_QUEUE_FULL is generated.
Definition at line 129 of file CC_TelemetryManager.cpp. |
|
Set the size of the immediate dispatch queue. This is an initialization method. It should only be called once. The size of the immediate dispatch queue can be zero for the case of applications where the immediate load service is disabled.
Definition at line 48 of file CC_TelemetryManager.cpp. |
|
Load the telemetry mode manager.
Definition at line 28 of file CC_TelemetryManager.cpp. |
|
Load the telemetry stream component. The telemetry stream is reset immediately after being loaded.
Definition at line 38 of file CC_TelemetryManager.cpp. |
|
Check if the argument telemetry packet is currently in the immediate dispatch queue and, if it is, remove it. Failure to find the argument packet is treated as a nominal situation and is therefore not recorded through an event report.
Definition at line 142 of file CC_TelemetryManager.cpp. |