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

DC_DummyPUSTelemetryPacket Class Reference

#include <DC_DummyPUSTelemetryPacket.h>

Inheritance diagram for DC_DummyPUSTelemetryPacket:

PUSTelemetryPacket TelemetryPacket CC_RootObject List of all members.

Detailed Description

Dummy implementation of the PUSTelemetryPacket class useful for testing purposes.

This telemetry packet encapsulates a single and settable byte. The update service is implemented to increment the value of the byte by one (with a wrap-around to zero when the value of 255 is reached). The values of the telemetry packet attributes are initialized to:

The constants are defined in file TestConstants.h. Note that the telemetry destination does not need to be set because it is already set to a default value by the constructor of class PUSTelemetryPacket. Similarly, the APID of the process generating the telemetry data does not need to be set because it is a static field that should be set during the test set up process.
See also:
TestConstants
Author:
Alessandro Pasetti (P&P Software GmbH)
Version:
1.0

Definition at line 40 of file DC_DummyPUSTelemetryPacket.h.

Public Member Functions

 DC_DummyPUSTelemetryPacket (void)
 Instantiate a dummy PUS telemetry packet component.

virtual unsigned int getNumberOfBytes (void)
 This method always returns 1.

virtual unsigned char getUnsignedByte (unsigned int n)
 Return the encapsulated byte.

virtual void update (void)
 Increment the value of the encapsulated byte by one.

void setValue (unsigned char value)
 Set the value of the encapsulated byte.


Constructor & Destructor Documentation

DC_DummyPUSTelemetryPacket::DC_DummyPUSTelemetryPacket void   ) 
 

Instantiate a dummy PUS telemetry packet component.

The class identifier is set, and the encapsulated byte is initialized with a value of 0. The telemetry packet attributes are set as indicated in the class comment.

Definition at line 17 of file DC_DummyPUSTelemetryPacket.cpp.


Member Function Documentation

unsigned int DC_DummyPUSTelemetryPacket::getNumberOfBytes void   )  [virtual]
 

This method always returns 1.

This telemetry packet only encapsulates one single byte.

Returns:
always return 1

Implements TelemetryPacket.

Definition at line 29 of file DC_DummyPUSTelemetryPacket.cpp.

unsigned char DC_DummyPUSTelemetryPacket::getUnsignedByte unsigned int  n  )  [virtual]
 

Return the encapsulated byte.

The value of the argument is ignored.

Returns:
the value of the encapsulated byte
Parameters:
n this parameter is ignored

Implements TelemetryPacket.

Definition at line 25 of file DC_DummyPUSTelemetryPacket.cpp.

void DC_DummyPUSTelemetryPacket::setValue unsigned char  value  ) 
 

Set the value of the encapsulated byte.

This is the value returned by method getUnsignedByteUnchecked.

See also:
#getUnsignedByteUnchecked
Parameters:
value the value of the encapsulated byte

Definition at line 40 of file DC_DummyPUSTelemetryPacket.cpp.

void DC_DummyPUSTelemetryPacket::update void   )  [virtual]
 

Increment the value of the encapsulated byte by one.

Wrap around to 0 when the value of 255 is reached.

Implements TelemetryPacket.

Definition at line 33 of file DC_DummyPUSTelemetryPacket.cpp.


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