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

TelemetryPacket Class Reference
[Telemetry Management]

#include <TelemetryPacket.h>

Inheritance diagram for TelemetryPacket:

CC_RootObject DC_DummyTelemetryPacket PUSTelemetryPacket StructuredTelemetryPacket DC_DummyPUSTelemetryPacket DC_PUSDataReportingPacket DC_PUSTcVerificationPacket PUSMemoryDump DC_DataItem16TmWord DC_PUSMemoryDumpAbsolute DC_PUSMemoryDumpOffset List of all members.

Detailed Description

Base class from which all telemetry packet classes are derived.

The Telemetry Item concept is implemented here to represent a group of ordered bytes that are intended to be sent to the telemetry stream and that constitute one single logical unit in the sense that they are collected together. This group of ordered bytes is referred to in what follows as the telemetry bytes.

This class defines five attributes, two services, and one check. The attributes allow the telemetry bytes to be characterized. They are:

The two services defined by this class are: Finally, the check defined by this class is the validity check. This service allows a client to ask a telemetry packet component to verify that the most recently updated information is valid.

Two implementations of the data acquisition service are provided: a safe implementation and a fast implementation. The safe implementation is built upon methods getUnsignedByte and getNumberOfBytes. It allows the most recently acquired telemetry bytes to be transfered one by one to the caller. This implementation is safe because it complies with all coding rules defined for the OBS Framework. However, it may not be fast because the transfer of each byte requires a call to a virtual method. The alternative implementation is built on methods getStartAddress and getNumberOfBytes. The former method returns a pointer to the internal data area where the telemetry bytes are stored. The latter returns the number of telemetry bytes. This implementation is fast because the caller can copy the telemetry bytes using a fast memory copy algorithm. It is potentially unsafe because it gives the caller access to an internal data structure of the telemetry packet component. The safe implementation of the data update service must always be provided by all concrete subclasses. The fast version may be provided by subclasses that manage large amounts of telemetry data. Method isFastAcquisitionImplemented is provided to allow a caller to check whether the fast implementation is provided. The fast version of the data acquisition service should be used only when necessary for performance reasons. By default, the safe version should be used.

Telemetry item instances are intended to be used by a component that collects telemetry data and forwards them to a telemetry channel (in the OBS Framework, this telemetry data collecting component is the telemetry manager instantiated from class CC_TelemetryManager). The telemetry packet class assumes that the collection of the telemetry data from one of its instances is performed in three steps as follows:<ol> The data update service is called The validity check is performed on the newly updated data The data acquisition service is called to acquire the telemetry data This class does not make any assumptions about the data structure that is used internally to store the telemetry bytes. It is an abstract class that is intended to provide a general interface capable of modeling telemetry packet concepts of varying complexity but it only provides minimal default implementations for its attributes, services and for the validity check. Applications should provide subclasses that implement their particular telemetry concept.

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

Definition at line 95 of file TelemetryPacket.h.

Public Member Functions

 TelemetryPacket (void)
 Instantiate a telemetry packet component.

virtual void setType (TD_TelemetryType tmType)
 Setter method for the telemetry packet type.

virtual void setSubType (TD_TelemetrySubType tmSubType)
 Setter method for the telemetry packet sub-type.

virtual void setTimeTag (TD_ObsTime timeTag)
 Setter method for the telemetry packet time tag.

virtual void setDestination (TD_TelemetryDestination tmDest)
 Setter method for the telemetry packet destination.

virtual unsigned int getNumberOfBytes (void)=0
 Return the number of bytes managed by this telemetry packet.

virtual void update (void)=0
 Implement the data update service.

virtual bool isValid (void)
 Execute the validity check on the most recently updated telemetry bytes.

virtual unsigned char getUnsignedByte (unsigned int n)=0
 Implement the safe version of the data acquisition service.

virtual unsigned char * getStartAddress (void)
 Implement the fast version of the data acquisition service.

virtual bool isFastAcquisitionImplemented (void)
 Return true if the fast version of the data acquisition service is implemented.

virtual TD_TelemetryType getType (void) const
 Getter method for the telemetry packet type.

virtual TD_TelemetrySubType getSubType (void) const
 Getter method for the telemetry sub-type.

virtual TD_ObsTime getTimeTag (void) const
 Getter method for the telemetry packet time tag.

virtual TD_TelemetryDestination getDestination (void) const
 Getter method for the telemetry packet destination.

void setInUse (bool newInUse)
 Set the value of the "in use" attribute.

bool isInUse (void) const
 Return the value of the "in use" attribute.


Constructor & Destructor Documentation

TelemetryPacket::TelemetryPacket void   ) 
 

Instantiate a telemetry packet component.

The "in use" flag is set to: "packet is not in use".

Definition at line 16 of file TelemetryPacket.cpp.


Member Function Documentation

TD_TelemetryDestination TelemetryPacket::getDestination void   )  const [virtual]
 

Getter method for the telemetry packet destination.

This class does not model the telemetry packet destination. This method always returns zero.

Returns:
the telemetry packet destination

Reimplemented in PUSTelemetryPacket.

Definition at line 48 of file TelemetryPacket.cpp.

virtual unsigned int TelemetryPacket::getNumberOfBytes void   )  [pure virtual]
 

Return the number of bytes managed by this telemetry packet.

Each telemetry packet is responsible for generating a fixed number of telemetry bytes. This method returns this fixed number.

Returns:
number of bytes in this telemetry packet

Implemented in DC_DummyPUSTelemetryPacket, DC_DummyTelemetryPacket, DC_PUSDataReportingPacket, DC_PUSTcVerificationPacket, PUSMemoryDump, and StructuredTelemetryPacket.

unsigned char * TelemetryPacket::getStartAddress void   )  [virtual]
 

Implement the fast version of the data acquisition service.

If this version of the service is implemented, then this method returns a pointer to start address of an internal data structure that holds all telemetry data as a linear sequence of bytes. The size of the internal data structure is given by method getNumberOfBytes). This method only has a meaningful implementation if the fast version of the data acquisition service is provided. This is the case if method isFastAcquisitionImplemented returns a value of true. If this is not the case, this method should return a null pointer. This class provideds a default implementation that returns a null pointer.

Returns:
a null pointer

Reimplemented in DC_PUSDataReportingPacket, and PUSMemoryDump.

Definition at line 64 of file TelemetryPacket.cpp.

TD_TelemetrySubType TelemetryPacket::getSubType void   )  const [virtual]
 

Getter method for the telemetry sub-type.

This class does not model the telemetry sub-type. This method always returns zero.

Returns:
the telemetry sub-type

Reimplemented in PUSTelemetryPacket.

Definition at line 32 of file TelemetryPacket.cpp.

TD_ObsTime TelemetryPacket::getTimeTag void   )  const [virtual]
 

Getter method for the telemetry packet time tag.

This class does not model the telemetry packet time tag. This method always returns zero.

Returns:
the telemetry packet time

Reimplemented in PUSTelemetryPacket.

Definition at line 40 of file TelemetryPacket.cpp.

TD_TelemetryType TelemetryPacket::getType void   )  const [virtual]
 

Getter method for the telemetry packet type.

This class implements the the type to coincide with the lest significant byte of the class identifier. A pseudo-code implementation of this method therefore is:<PRE> return (TD_TelemetryType)(getClassId()256); The modulo operation ensures that there is no overflow even if there is a type mismatch between type TD_TelemetryType the type of the type of the class identifier.

Returns:
the telemetry packet type

Reimplemented in PUSTelemetryPacket.

Definition at line 24 of file TelemetryPacket.cpp.

virtual unsigned char TelemetryPacket::getUnsignedByte unsigned int  n  )  [pure virtual]
 

Implement the safe version of the data acquisition service.

The telemetry data provided by this class are treated as a sequence of bytes. The method returns the n-th telemetry byte. The parameter n must lie in the interval [0, N-1] where N is the number of telemetry bytes (the return value of method getNumberOfBytes).

Returns:
value of n-th telemetry byte
Parameters:
n the telemetry byte to be returned (starting with byte 0)

Implemented in DC_DummyPUSTelemetryPacket, DC_DummyTelemetryPacket, DC_PUSDataReportingPacket, DC_PUSTcVerificationPacket, PUSMemoryDump, and StructuredTelemetryPacket.

bool TelemetryPacket::isFastAcquisitionImplemented void   )  [virtual]
 

Return true if the fast version of the data acquisition service is implemented.

This class provides a default implementation that returns false.

See also:
getStartAddress
Returns:
true if the fast version of the data acquisition service is implemented

Reimplemented in DC_PUSDataReportingPacket, and PUSMemoryDump.

Definition at line 68 of file TelemetryPacket.cpp.

bool TelemetryPacket::isInUse void   )  const
 

Return the value of the "in use" attribute.

If the method returns true, then the packet is already in use, otherwise it is free and can be configured.

See also:
setInUse
Returns:
the value of the "in use" attribute.

Definition at line 60 of file TelemetryPacket.cpp.

bool TelemetryPacket::isValid void   )  [virtual]
 

Execute the validity check on the most recently updated telemetry bytes.

This class provides a default implementation that always return "data valid".

See also:
update
Returns:
true if the most recently updated telemetry bytes are valid, false otherwise

Reimplemented in DC_DummyTelemetryPacket.

Definition at line 20 of file TelemetryPacket.cpp.

void TelemetryPacket::setDestination TD_TelemetryDestination  tmDest  )  [virtual]
 

Setter method for the telemetry packet destination.

Since this class does not model the telemetry packet destination, this method is implemented as a dummy method that returns without taking any action.

See also:
getDestination
Parameters:
tmDest telemetry packet destination

Reimplemented in PUSTelemetryPacket.

Definition at line 52 of file TelemetryPacket.cpp.

void TelemetryPacket::setInUse bool  newInUse  ) 
 

Set the value of the "in use" attribute.

See also:
isInUse
Parameters:
newInUse the new value of the in use attribute

Definition at line 56 of file TelemetryPacket.cpp.

void TelemetryPacket::setSubType TD_TelemetrySubType  tmSubType  )  [virtual]
 

Setter method for the telemetry packet sub-type.

Since this class does not model the telemetry packet sub-type, this method is implemented as a dummy method that returns without taking any action.

See also:
getSubType
Parameters:
tmSubType the telemetry packet sub-type

Reimplemented in PUSTelemetryPacket.

Definition at line 36 of file TelemetryPacket.cpp.

void TelemetryPacket::setTimeTag TD_ObsTime  timeTag  )  [virtual]
 

Setter method for the telemetry packet time tag.

Since this class does not model the telemetry packet time tag, this method is implemented as a dummy method that returns without taking any action.

See also:
getTimeTag
Parameters:
timeTag the telemetry packet time tag

Reimplemented in PUSTelemetryPacket.

Definition at line 44 of file TelemetryPacket.cpp.

void TelemetryPacket::setType TD_TelemetryType  tmType  )  [virtual]
 

Setter method for the telemetry packet type.

Since this class identifies the telemetry packet type with the class identifier (see CC_RootObject), this method is implemented as a dummy method that returns without taking any action.

See also:
getType
Parameters:
tmType the telemetry packet type

Reimplemented in PUSTelemetryPacket.

Definition at line 28 of file TelemetryPacket.cpp.

virtual void TelemetryPacket::update void   )  [pure virtual]
 

Implement the data update service.

A call to this method should normally be followed by a call to method isValid to verify the validity of the newly updated data.

Implemented in DC_DataItem16TmWord, DC_DummyPUSTelemetryPacket, DC_DummyTelemetryPacket, DC_PUSDataReportingPacket, DC_PUSMemoryDumpAbsolute, DC_PUSMemoryDumpOffset, DC_PUSTcVerificationPacket, and StructuredTelemetryPacket.


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