#include <TelemetryStream.h>
Inheritance diagram for TelemetryStream:
A telemetry stream represents a data sink to which individual telemetry packets can be written. The telemetry packets are assumed to be encapsulated in objects of type TelemetryPacket
. This is an abstract class since the mechanism through which the telemetry items are written to a physical telemetry channel vary widely across applications.
The basic service provided by this class is implemented by a write
operation that takes an instance of type TelemetryPacket
as an argument. An application would implement this operation to write the content of the telemetry packet to a physical telemetry channel. Additionally, housekeeping operations are provided to manage the telemetry stream. These operations are designed to be compatible with a wide range of concrete telemetry stream mechanisms. Given the diversity of such mechanisms, this means that the semantics of the operations is only weakly defined in this base class. More specific definitions are left to the sub-classes. There is however one important constraint on the implementations provided by the sub-classes. Some of the methods declared by class TelemetryStream
receive as an argument a pointer to the telemetry packet whose content must be written to the telemetry data sink. Telemetry packets are in principle allocated dynamically by a telemetry packet factory. Hence, if the telemetry stream needs to buffer information about the telemetry packet, it should do so by copying its content to an internal buffer. It should not try to store the pointer to the telemetry packet in order to access it at a later time.
Definition at line 52 of file TelemetryStream.h.
Public Member Functions | |
TelemetryStream (void) | |
Instantiate a telemetry stream component. | |
virtual void | reset (void) |
Reset the telemetry stream. | |
virtual void | flush (void) |
Flush the telemetry stream. | |
virtual unsigned int | getCapacity (void) |
Return the capacity of the telemetry stream. | |
virtual bool | doesPacketFit (TelemetryPacket *pTmPacket) |
Check whether there is enough space in the telemetry stream for writing the argument telemetry packet. | |
virtual void | write (TelemetryPacket *tmItem)=0 |
Write the content of the telemetry packet to the telemetry stream. |
|
Instantiate a telemetry stream component. This constructor returns without taking any action. Definition at line 14 of file TelemetryStream.cpp. |
|
Check whether there is enough space in the telemetry stream for writing the argument telemetry packet. Some telemetry streams may have a limited capacity. Before performing a write operation, it may therefore be necessary to check whether there is enough space in the telemetry stream for the data that it is desired to write. This operation checks whether there is enough space for writing the content of the argument telemetry packet. This class provides a default implementation that always returns "enough space".
Reimplemented in DC_BasicPUSTmStream, DC_ByteArrayTelemetryStream, DC_CycleDataItem16TmStream, and DC_PUSTmLogger. Definition at line 27 of file TelemetryStream.cpp. |
|
Flush the telemetry stream.
The effect of a flush are implementation-specific. This class provides a default implementation that does not take any action. This operation is typically useful when the telemetry stream maintains an internal buffer to which it writes the telemetry data. The Reimplemented in DC_BasicPUSTmStream, DC_ByteArrayTelemetryStream, DC_CycleDataItem16TmStream, and DC_FileTelemetryStream. Definition at line 20 of file TelemetryStream.cpp. |
|
Return the capacity of the telemetry stream. Some telemetry stream may have a capacity attribute associated to them. This method returns its value. This class provides a default implementation that returns MAX_INT.
Reimplemented in DC_BasicPUSTmStream, DC_ByteArrayTelemetryStream, and DC_CycleDataItem16TmStream. Definition at line 23 of file TelemetryStream.cpp. |
|
Reset the telemetry stream. The effect of a reset are implementation-specific. This class provides a default implementation that does not take any action. Reimplemented in DC_BasicPUSTmStream, DC_ByteArrayTelemetryStream, and DC_CycleDataItem16TmStream. Definition at line 17 of file TelemetryStream.cpp. |
|
Write the content of the telemetry packet to the telemetry stream.
Implemented in DC_BasicPUSTmStream, DC_ByteArrayTelemetryStream, DC_CycleDataItem16TmStream, DC_DummyTelemetryStream, DC_FileTelemetryStream, and DC_PUSTmLogger. |