#include <PUSDumpMemory.h>
Inheritance diagram for PUSDumpMemory:
This class encapsulates the commonalities for the following subtypes of PUS service number 6:
setNumberOfRawData
). This and other internal data structured are declared protected
in order to facilitate the implementation of concrete subclasses. During normal operation, configuration is performed using the raw data load service. Since in most cases the amount of data to be loaded can be large, the more efficient (but less safe) implementation of this service is used.
This telecommand implements a validity check that returns "telecommand not valid" in case an attempt is made to load more application data than fit into the telecommand component.
No implementation for the execution action of this telecommand is provided. This depends on whether the memory dump is of the "absolute address" or the "base address plus offset" type and must therefore be provided by the concrete subclasses.
The PUS leaves some leeway in the definition of the structure of the application data for memory dump telecommands. This implementation makes the same assumptions as defined in the class comment of class PUS_MemoryDump
.
Definition at line 49 of file PUSDumpMemory.h.
Public Member Functions | |
PUSDumpMemory (void) | |
Instantiate a memory dump PUS telecommand. | |
void | setNumberOfRawData (unsigned int max) |
Set the maximum size of the application data array. | |
virtual unsigned int | getNumberOfRawData (void) |
Get the maximum size of the application data array. | |
virtual void | setRawData (unsigned char *d, unsigned int n) |
Implementation of the raw data load service. | |
virtual unsigned int | getNumberOfApplicationData (void) const |
Return the number of application data bytes that were loaded with the last call to method setRawData . | |
void | setTelemetryManager (CC_TelemetryManager *pTmManager) |
Load the telemetry manager. | |
CC_TelemetryManager * | getTelemetryManager () const |
Getter method for the telemetry manager. | |
virtual bool | isObjectConfigured (void) |
Perform a class-specific configuration check on the telecommand: check that the maximum number of raw data has been set and that the telemetry manager has been loaded. | |
Protected Attributes | |
unsigned char * | data |
The buffer where the application data are stored. | |
unsigned int | maxNumberData |
The size in number of bytes of the data buffer. | |
unsigned int | numberData |
The size in the number of bytes of the currently loaded application data. | |
CC_TelemetryManager * | pTmManager |
The telemetry manager. |
|
Instantiate a memory dump PUS telecommand. The values of the internal data structure that is used to hold the telecommand application data is initialized to illegal values to signify that the telecommand is not yet configured. The telecommand type is set to PUS_TYPE_MEM. Definition at line 21 of file PUSDumpMemory.cpp. |
|
Return the number of application data bytes that were loaded with the last call to method
The number returned by this method is the same as the value of the argument n in the call to method
Definition at line 60 of file PUSDumpMemory.cpp. |
|
Get the maximum size of the application data array.
Definition at line 40 of file PUSDumpMemory.cpp. |
|
Getter method for the telemetry manager.
Definition at line 69 of file PUSDumpMemory.cpp. |
|
Perform a class-specific configuration check on the telecommand: check that the maximum number of raw data has been set and that the telemetry manager has been loaded.
Reimplemented from PUSTelecommand. Definition at line 73 of file PUSDumpMemory.cpp. |
|
Set the maximum size of the application data array. The maximum size is specified as the maximum number of bytes of the application data. This is an initialization method that should only be called once. A call to this method causes the internal data structures of the telecommand to be allocated and initialized. Only positive values of the method argument are legal.
Definition at line 30 of file PUSDumpMemory.cpp. |
|
Implementation of the raw data load service.
This method copies the argument array into an internal array. The number of bytes n in the argument array must be less than the maximum value set with method
Reimplemented from Telecommand. Definition at line 44 of file PUSDumpMemory.cpp. |
|
Load the telemetry manager.
Definition at line 64 of file PUSDumpMemory.cpp. |