#include <DC_ByteArrayTelemetryStream.h>
Inheritance diagram for DC_ByteArrayTelemetryStream:
Only the telemetry bytes in the telemetry item are written to the stream. Header information (the telemetry packet destination, time tag, type and subtype) are ignored. The byte array is characterized by a starting address and by a size. The starting address and the size are settable configuration parameters.
This class maintains a write counter. The write counter is reset to 0 by a call to operation reset
or flush
. It is incremented every time a byte is written to the byte array. If its value is smaller than the size of the byte array, then the write counter points to the location in the byte array where the next telemetry data will be written. Write requests that cannot be processed because there is not enough space in the byte array have no effect. It is the responsibility of the user to perform reset or flush operations when the byte array has been completely filled.
Definition at line 41 of file DC_ByteArrayTelemetryStream.h.
Public Member Functions | |
DC_ByteArrayTelemetryStream (void) | |
Instantiate the component. | |
virtual void | reset (void) |
Reset the telemetry stream. | |
virtual void | flush (void) |
The flush operation is equivalent to a reset operation. | |
virtual unsigned int | getCapacity (void) |
Return the capacity of the telemetry stream. | |
void | setCapacity (unsigned int n) |
Set the capacity of the telemetry stream. | |
void | setStartingAddress (unsigned char *pAddress) |
Set the starting address of the byte array. | |
unsigned char * | getStartingAddress (void) const |
Get the starting address of the byte array. | |
virtual bool | doesPacketFit (TelemetryPacket *pPacket) |
Return true if there is enough space in the byte array to write the argument telemetry packet. | |
virtual void | write (TelemetryPacket *pItem) |
Write one telemetry packet to the byte array. | |
virtual bool | isObjectConfigured (void) |
Perform a class-specific configuration check on the telemetry stream: verify that the size and starting address of the byte array have been loaded. |
|
Instantiate the component. The class identifier is set. The size and starting address of the byte array are set to illegal values to signify that the component is not yet configured. The write counter is set to zero. Definition at line 17 of file DC_ByteArrayTelemetryStream.cpp. |
|
Return true if there is enough space in the byte array to write the argument telemetry packet. A pseudo-code implementation for this method is as follows: if ( pItem->getNumberOFBytes() greater than (N-writeCounter) ) return false; else return true;where N is the size of the byte array and writeCounter is the value of the write counter.
Reimplemented from TelemetryStream. Definition at line 53 of file DC_ByteArrayTelemetryStream.cpp. |
|
The flush operation is equivalent to a reset operation.
Reimplemented from TelemetryStream. Definition at line 29 of file DC_ByteArrayTelemetryStream.cpp. |
|
Return the capacity of the telemetry stream. The capacity of this telemetry stream is equal to the size in bytes of the byte array.
Reimplemented from TelemetryStream. Definition at line 33 of file DC_ByteArrayTelemetryStream.cpp. |
|
Get the starting address of the byte array.
Definition at line 48 of file DC_ByteArrayTelemetryStream.cpp. |
|
Perform a class-specific configuration check on the telemetry stream: verify that the size and starting address of the byte array have been loaded.
Reimplemented from CC_RootObject. Definition at line 69 of file DC_ByteArrayTelemetryStream.cpp. |
|
Reset the telemetry stream. The write counter is reset to 0. Reimplemented from TelemetryStream. Definition at line 24 of file DC_ByteArrayTelemetryStream.cpp. |
|
Set the capacity of the telemetry stream.
The capacity of this telemetry stream is equal to the size in bytes of the byte array. If s is the staring address of the byte array (loaded with method
Definition at line 38 of file DC_ByteArrayTelemetryStream.cpp. |
|
Set the starting address of the byte array. This component does not perform any memory allocation operation. It assumes that the memory for the byte array has already been allocated by the caller of this method.
Definition at line 43 of file DC_ByteArrayTelemetryStream.cpp. |
|
Write one telemetry packet to the byte array. The telemetry bytes read from the telemetry packet are written starting at location wc in the byte array where wc is the value of the write counter. When the end of the byte array is reached, the method returns.
Implements TelemetryStream. Definition at line 58 of file DC_ByteArrayTelemetryStream.cpp. |