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

DC_PUSMemoryLoadAbsolute Class Reference

#include <DC_PUSMemoryLoadAbsolute.h>

Inheritance diagram for DC_PUSMemoryLoadAbsolute:

PUSMemoryLoad PUSTelecommand Telecommand PunctualAction CC_RootObject List of all members.

Detailed Description

Class implementing the PUS service to load memory using absolute addresses (PUS service type 6, subtype 2).

This class adds to its superclass the implementation of the raw data load mechanism. Since the amount of data to be loaded will often be large, the fast version of this service is implemented. The data load mechanism interprets the application data in the telecommand packet and uses them to configure the internal data structure defined by the super class. The interpretation of the application data can result in the detection of inconsistencies or invalid data. These are reported by setting the validity check code.

The PUS leaves some leeway in the definition of the structure of the application data for memory load telecommands. This implementation makes the following assumptions:

The implementation of this class assumes type TD_PUSMemId to have size 1 (i.e. to be a char or an unsigned char).
Author:
Alessandro Pasetti (P&P Software GmbH)
Version:
1.0

Definition at line 40 of file DC_PUSMemoryLoadAbsolute.h.

Public Member Functions

 DC_PUSMemoryLoadAbsolute (void)
 Instantiate a PUS memory load using base offset telecommand.

virtual void setRawData (unsigned char *d, unsigned int n)
 Implementation of the raw data load service.

TD_PUSMemId getMemoryBlockId () const
 Get the memory block ID.


Constructor & Destructor Documentation

DC_PUSMemoryLoadAbsolute::DC_PUSMemoryLoadAbsolute void   ) 
 

Instantiate a PUS memory load using base offset telecommand.

The class identifier and the telecommand subtype are set. The memory block ID is initialized to zero.

Definition at line 18 of file DC_PUSMemoryLoadAbsolute.cpp.


Member Function Documentation

TD_PUSMemId DC_PUSMemoryLoadAbsolute::getMemoryBlockId  )  const
 

Get the memory block ID.

Returns:
the maximum number of blocks

Definition at line 75 of file DC_PUSMemoryLoadAbsolute.cpp.

void DC_PUSMemoryLoadAbsolute::setRawData unsigned char *  d,
unsigned int  n
[virtual]
 

Implementation of the raw data load service.

This method would normally be called by a telecommand loader to load the application data into the the telecommand component. This method interprets the raw data as they are loaded and uses them to configure the data structure (defined by the super class) that holds the start address, the length, the checksum, and the memory load data for each block. The application data are constrained to fit within the data structures configured at the level of the superclass. Two such constraints apply:<ul> The number of bytes to be transferred (the value of argument n) must be greater than: sizeof(TD_PUSMemId)+sizeof(TD_PUSNumberMemBlocks). If this is not the case, the validity check code is set to VC_INCONSISTENT_RAW_DATA. The number of blocks must be less or equal than the maximum number of blocks defined in the super class. If this is not the case, the validity check code is set to VC_TOO_MANY_MEM_BLOCK. The total number of memory data to be loaded must not exceed the maximum value defined in the super class. If this is not the case, the validity check code is set to VC_TOO_MANY_MEM_DATA. The number of bytes to be transferred (the value of argument n) must be consistent with the number of blocks and of data inferred from the application data. If this is not the case, the validity check code is set to VC_INCONSISTENT_RAW_DATA. When a constraint is violated, the method returns immediately after setting the value of the validity check code.

Parameters:
n the number of bytes in the raw data
d the starting address of the raw data

Reimplemented from Telecommand.

Definition at line 24 of file DC_PUSMemoryLoadAbsolute.cpp.


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