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

DC_PUSMemoryDumpOffset Class Reference

#include <DC_PUSMemoryDumpOffset.h>

Inheritance diagram for DC_PUSMemoryDumpOffset:

PUSMemoryDump PUSTelemetryPacket TelemetryPacket CC_RootObject List of all members.

Detailed Description

PUS telemetry packet implementing the memory dump service using base plus offset (type 6, subtype 4).

This class adds to its superclass the modelling of the base address and the implementation of the data update service.

Todo:
construct a test case for this class.
Author:
Alessandro Pasetti (P&P Software GmbH)
Version:
1.0

Definition at line 26 of file DC_PUSMemoryDumpOffset.h.

Public Member Functions

 DC_PUSMemoryDumpOffset (void)
 Instantiate a PUS memory dump with offset telemetry packet.

void setBaseAddress (TD_PUSMemData *base)
 Set the base address for the dump packet.

TD_PUSMemDatagetBaseAddress ()
 Get the base address for the dump packet.

virtual void update (void)
 Implement the data update service for the PUS memory dump with offset telemetry packet.


Constructor & Destructor Documentation

DC_PUSMemoryDumpOffset::DC_PUSMemoryDumpOffset void   ) 
 

Instantiate a PUS memory dump with offset telemetry packet.

The class identifier is set. The telemetry subtype attribute is set to PUS_ST_TM_DMP_OFF. The base address is initialized to zero.

Definition at line 22 of file DC_PUSMemoryDumpOffset.cpp.


Member Function Documentation

TD_PUSMemData * DC_PUSMemoryDumpOffset::getBaseAddress  ) 
 

Get the base address for the dump packet.

See also:
setBaseAddress
Returns:
the base address

Definition at line 33 of file DC_PUSMemoryDumpOffset.cpp.

void DC_PUSMemoryDumpOffset::setBaseAddress TD_PUSMemData base  ) 
 

Set the base address for the dump packet.

Only values greater than zero are legal.

See also:
update
Parameters:
base the base address

Definition at line 28 of file DC_PUSMemoryDumpOffset.cpp.

void DC_PUSMemoryDumpOffset::update void   )  [virtual]
 

Implement the data update service for the PUS memory dump with offset telemetry packet.

The memory locations to be dumped are stored in the block data structure defined in the superclass. The memory dump data are collected and stored in the dump buffer which is also defined in the superclass. Both the block and dump buffer structures are declared protected in the superclass and can therefore be directly accessed here. This method uses the data in the block structure and the value of the base address to construct and image of the telemetry packet and store it in the dump buffer.

This method relies on the data in the block data structure to be consistent with the value of the base address. In particular, the following must be ensured:

  • The value of the base address must be smaller than all the startAddress fields of the block data structure.
  • The offset field is computed as the difference between the value of the startAddress field of the block data structure and the value of the base address. The result must be expressible as an integer of type TD_PUSMemOffset.
Compliance with the above conditions is not checked at run time (but violation may result in in a run-time exception). As they are collected, the memory dump data are stored in the dump buffer defined by the superclass. A check is made that there is no overflow. If this is found to be the case, then the method returns after generating event report EVT_PUS_TOO_MANY_MEM_DATA. In this case, no memory dump data are collected.

Implements TelemetryPacket.

Definition at line 37 of file DC_PUSMemoryDumpOffset.cpp.


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