#include <DC_PUSTmLogger.h>
Inheritance diagram for DC_PUSTmLogger:
This class defines a telemetry buffer where telemetry packets are stored as they are written to the telemetry stream. The telemetry buffer is organized as a circular buffer. When the end of the buffer is reached, its first entry is overwritten. This class must be configured by specifying the capacity of the buffer and the maximum length (in bytes) of the application data of the telemetry packets to be stored in the buffer. This class is intended to be used for testing purposes only.
This telemetry stream writes the following data to the telemery buffer for each telemetry packet:
Definition at line 42 of file DC_PUSTmLogger.h.
Public Member Functions | |
DC_PUSTmLogger (void) | |
Instantiate the component. | |
void | setBufferCapacity (unsigned int n) |
Set the capacity of the telemetry buffer. | |
unsigned int | getBufferCapacity (void) const |
Return the capacity of the telemetry buffer. | |
void | setMaxPacketLength (unsigned int n) |
Set the maximum length (in number of bytes) of the application of the telemetry packets. | |
unsigned int | getMaxPacketLength (void) const |
Return the capacity of the telemetry buffer. | |
unsigned int | getPacketCounter (void) const |
Get the number of packets that have been written to the telemetry logger so far. | |
TD_TelemetryType | getType (unsigned int i) const |
Get the type of the i-th packet before the last in the telemetry buffer. | |
TD_TelemetrySubType | getSubType (unsigned int i) const |
Get the subtype of the i-th packet before the last in the telemetry buffer. | |
TD_ObsTime | getTimeTag (unsigned int i) const |
Get the time tag of the i-th packet before the last in the telemetry buffer. | |
unsigned int | getLength (unsigned int i) const |
Get the length (number of bytes in the application data) of the i-th packet before the last in the telemetry buffer. | |
unsigned char | getData (unsigned int i, unsigned int j) const |
Get the j-th application data byte of the i-th packet before the last in the telemetry buffer. | |
virtual bool | doesPacketFit (TelemetryPacket *pPacket) |
Return true if the argument packet fits in the telemetry logger. | |
virtual void | write (TelemetryPacket *pItem) |
Write one telemetry packet to the telemetry logger. | |
virtual bool | isObjectConfigured (void) |
Perform a class-specific configuration check on the telemetry logger stream: verify that the maximum length of the telemetry packets and the maximum number of telemetry packets have been set. |
|
Instantiate the component. The class identifier is set. The telemetry buffer is left uninitialized to signify that the component is not yet configured. Definition at line 21 of file DC_PUSTmLogger.cpp. |
|
Return true if the argument packet fits in the telemetry logger. A pseudo-code implementation for this method is as follows: if ( pItem->getNumberOfBytes()<getMaxPacketLength() ) return true; else return false;
Reimplemented from TelemetryStream. Definition at line 71 of file DC_PUSTmLogger.cpp. |
|
Return the capacity of the telemetry buffer.
Definition at line 45 of file DC_PUSTmLogger.cpp. |
|
Get the j-th application data byte of the i-th packet before the last in the telemetry buffer.
The way the argument i is interpreted is the same as for method
|
|
Get the length (number of bytes in the application data) of the i-th packet before the last in the telemetry buffer.
The way the argument i is interpreted is the same as for method
|
|
Return the capacity of the telemetry buffer.
Definition at line 63 of file DC_PUSTmLogger.cpp. |
|
Get the number of packets that have been written to the telemetry logger so far.
Definition at line 67 of file DC_PUSTmLogger.cpp. |
|
Get the subtype of the i-th packet before the last in the telemetry buffer.
The way the argument i is interpreted is the same as for method
|
|
Get the time tag of the i-th packet before the last in the telemetry buffer.
The way the argument i is interpreted is the same as for method
|
|
Get the type of the i-th packet before the last in the telemetry buffer. If N is the number of packets to have been written so far to the telemetry logger stream, then this method returns the type of the (N-i)-th packet to have been written to the logger. The value of i should be smaller than the capacity of the telemetry buffer. If this is not the case, then a value of zero is returned.
|
|
Perform a class-specific configuration check on the telemetry logger stream: verify that the maximum length of the telemetry packets and the maximum number of telemetry packets have been set.
Reimplemented from CC_RootObject. Definition at line 108 of file DC_PUSTmLogger.cpp. |
|
Set the capacity of the telemetry buffer. The capacity of the telemetry buffer is the maximum number of telemetry packets that can be written to the buffer without overwriting any existing packet. This is an initialization method that should only be called once. Only positive values for the argument of this method are legal.
Definition at line 29 of file DC_PUSTmLogger.cpp. |
|
Set the maximum length (in number of bytes) of the application of the telemetry packets. This is an initialization method that should only be called once. Only positive values for the argument of this method are legal.
Definition at line 49 of file DC_PUSTmLogger.cpp. |
|
Write one telemetry packet to the telemetry logger.
When the telemetry logger is full, its oldest entry is overwritten. If the length of the packet exceeds M (the maximum length set with method
Implements TelemetryStream. Definition at line 80 of file DC_PUSTmLogger.cpp. |