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

TelemetryStream Class Reference
[Telemetry Management]

#include <TelemetryStream.h>

Inheritance diagram for TelemetryStream:

CC_RootObject DC_BasicPUSTmStream DC_ByteArrayTelemetryStream DC_CycleDataItem16TmStream DC_DummyTelemetryStream DC_FileTelemetryStream DC_PUSTmLogger List of all members.

Detailed Description

Base class from which all telemetry stream classes are derived.

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.

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

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.


Constructor & Destructor Documentation

TelemetryStream::TelemetryStream void   ) 
 

Instantiate a telemetry stream component.

This constructor returns without taking any action.

Definition at line 14 of file TelemetryStream.cpp.


Member Function Documentation

bool TelemetryStream::doesPacketFit TelemetryPacket pTmPacket  )  [virtual]
 

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".

Parameters:
pTmPacket the telemetry packet to be written to the telemetry stream
Returns:
true if there is enough space in the telemetry stream to write n bytes, false otherwise

Reimplemented in DC_BasicPUSTmStream, DC_ByteArrayTelemetryStream, DC_CycleDataItem16TmStream, and DC_PUSTmLogger.

Definition at line 27 of file TelemetryStream.cpp.

void TelemetryStream::flush void   )  [virtual]
 

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 flush operation can then be implemented to emtpy the buffer and write its content to a telemetry channel.

Reimplemented in DC_BasicPUSTmStream, DC_ByteArrayTelemetryStream, DC_CycleDataItem16TmStream, and DC_FileTelemetryStream.

Definition at line 20 of file TelemetryStream.cpp.

unsigned int TelemetryStream::getCapacity void   )  [virtual]
 

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.

See also:
MAX_INT
Returns:
the capacity of the telemetry stream

Reimplemented in DC_BasicPUSTmStream, DC_ByteArrayTelemetryStream, and DC_CycleDataItem16TmStream.

Definition at line 23 of file TelemetryStream.cpp.

void TelemetryStream::reset void   )  [virtual]
 

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.

virtual void TelemetryStream::write TelemetryPacket tmItem  )  [pure virtual]
 

Write the content of the telemetry packet to the telemetry stream.

Parameters:
tmItem the telemetry packet to be written to the telemetry stream

Implemented in DC_BasicPUSTmStream, DC_ByteArrayTelemetryStream, DC_CycleDataItem16TmStream, DC_DummyTelemetryStream, DC_FileTelemetryStream, and DC_PUSTmLogger.


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