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

TestCaseBasicPUSTcLoader_1 Class Reference

#include <TestCaseBasicPUSTcLoader_1.h>

Inheritance diagram for TestCaseBasicPUSTcLoader_1:

TestCasePUSFull TestCaseWithFactories TestCaseWithEvtCheck TestCaseGenericSetUp TestCase List of all members.

Detailed Description

Check the functionality of the DC_BasicPUSTcLoader class.

The test case retrieves the following items from its super class TestCasePUSFull or from the telecommand factory:<ul> An instance of the basic telecommand loader Three instances of DC_TestPUSTelecommand The telecommand manager The following specific checks are then performed:<ol> The correctness of the class identifier of the TC loader is checked. The value of the maximum number of telecommands is set and read back. The correctness of the read-back value is checked. The value of the maximum length of a telecommand packet is set and read back. The correctness of the read-back value is checked. A single telecommand packet is written to the telecommand load area and the telecommand loader is then activated. It is checked that the TC manager reports one telecommand loaded. The loaded telecommand is retrieved from the telecommand manager and it is checked that its configuration is as expected and that it is marked as "in use". The telecommand manager is activated and it is checked that afterwards the telecommand is marked as "not in use". Two telecommand packets are written to the telecommand load area of which one has a packet ID field that indicates that it should not be processed by the telecommand loader. The telecommand loader is activated. It is checked that the TC manager reports only one telecommand loaded. Three telecommand packets are written to the telecommand load area and the telecommand loader is then activated. It is checked that the TC manager reports three telecommands loaded. The loaded telecommands are retrieved from the telecommand manager and it is checked that their configuration is as expected and that they are marked as "in use". The telecommand manager is activated and it is checked that afterwards the three telecommands are marked as "not in use". A telecommand packet is written that has a length exceeding the maximum accepted by the loader is written to the telecommand load area. The TC loader is activated and it is checked that the correct event is generated. Two telecommand packets are written of which the first one has a type value not recognized by the TC loader is written to the telecommand load area. The TC loader is activated and it is checked that the correct event is generated. A number of telecommands exceeding the maximum accepted by the loader are written to the telecommand load area. The TC loader is activated and it is checked that the correct event is generated. Four DC_BasicPUSTelecommands are written to the telecommand load area. The TC loader is activated and it is checked that the correct event is generated. This test assumes that the telecommand fctory only manages three telecommand of type DC_BasicPUSTelecommands. Note that, in order to be loaded into the list of pending telecommands in the telecommand manager, the test telecommands used in this test case are always configured to be valid.

See also:
DC_BasicPUSTcLoader
Author:
Alessandro Pasetti (P&P Software GmbH)
Version:
1.0

Definition at line 68 of file TestCaseBasicPUSTcLoader_1.h.

Public Member Functions

 TestCaseBasicPUSTcLoader_1 (void)
 Set the identifier and the name of the test case to, respectively, ID_BASICPUSTCLOADER*10+1 and "TestCaseBasicPUSTcLoader_1".

virtual void runTestCase (void)
 Execute the test case.

void writeTcHeader (unsigned int start, unsigned short packetID, unsigned short packetSeqControl, unsigned short packetLength, unsigned char ackField, unsigned char tcType, unsigned char tcSubType, TD_TelecommandSource tcSource)
 Write the header part of a DC_TestPUSTelecommand packet starting at location start with a configuration as defined by the method parameters.

void writeTcData (unsigned int start, unsigned int execCounter, bool execCheckVal, bool valCheckVal, TD_CheckCode execCheckCode, TD_CheckCode valCheckCode, bool execOutcome)
 Write the data part of a DC_TestPUSTelecommand packet starting at location start with a configuration as defined by the method parameters.

bool checkTcConfig (DC_TestPUSTelecommand *pTC, unsigned short packetID, unsigned short packetSeqControl, unsigned char ackField, TD_TelecommandSource tcSource, unsigned int execCounter, bool execCheckVal, bool valCheckVal, TD_CheckCode execCheckCode, TD_CheckCode valCheckCode, bool execOutcome)
 Check that the argument DC_TestPUSTelecommand telecommand is configured as specified by the method parameters.


Member Function Documentation

bool TestCaseBasicPUSTcLoader_1::checkTcConfig DC_TestPUSTelecommand pTC,
unsigned short  packetID,
unsigned short  packetSeqControl,
unsigned char  ackField,
TD_TelecommandSource  tcSource,
unsigned int  execCounter,
bool  execCheckVal,
bool  valCheckVal,
TD_CheckCode  execCheckCode,
TD_CheckCode  valCheckCode,
bool  execOutcome
 

Check that the argument DC_TestPUSTelecommand telecommand is configured as specified by the method parameters.

Note that in order to check the execution outcome, the method "executes" the telecommand and therefore causes its execution counter to be incremented by one.

See also:
DC_TestPUSTelecommand
Parameters:
pTC the telecommand to be checked
packetID the packet ID
packetSeqControl the packet sequence control
ackField the acknowledge field
tcSource the TC source
execCounter the execution counter value
execCheckVal the execution check value
valCheckVal the validity check value
execCheckCode the execution check code
valCheckCode the validity check code
execOutcome the outcome of the execution check
Returns:
true if the telecommand is configured as specified

Definition at line 387 of file TestCaseBasicPUSTcLoader_1.cpp.

void TestCaseBasicPUSTcLoader_1::runTestCase void   )  [virtual]
 

Execute the test case.

See class comment for details.

Reimplemented from TestCaseGenericSetUp.

Definition at line 30 of file TestCaseBasicPUSTcLoader_1.cpp.

void TestCaseBasicPUSTcLoader_1::writeTcData unsigned int  start,
unsigned int  execCounter,
bool  execCheckVal,
bool  valCheckVal,
TD_CheckCode  execCheckCode,
TD_CheckCode  valCheckCode,
bool  execOutcome
 

Write the data part of a DC_TestPUSTelecommand packet starting at location start with a configuration as defined by the method parameters.

See also:
DC_TestPUSTelecommand
Parameters:
start the location in the telecommand loader where the TC data are to be written
execCounter the execution counter value
execCheckVal the execution check value
valCheckVal the validity check value
execCheckCode the execution check code
valCheckCode the validity check code
execOutcome the outcome of the execution check

Definition at line 374 of file TestCaseBasicPUSTcLoader_1.cpp.

void TestCaseBasicPUSTcLoader_1::writeTcHeader unsigned int  start,
unsigned short  packetID,
unsigned short  packetSeqControl,
unsigned short  packetLength,
unsigned char  ackField,
unsigned char  tcType,
unsigned char  tcSubType,
TD_TelecommandSource  tcSource
 

Write the header part of a DC_TestPUSTelecommand packet starting at location start with a configuration as defined by the method parameters.

Both the packet header and the header part of the packet data field are written.

See also:
DC_TestPUSTelecommand
Parameters:
start the location in the telecommand loader where the TC header is to be written
packetID the packet ID
packetSeqControl the packet sequence control
packetLength the packet length
ackField the acknowledge field
tcType the TC type
tcSubType the TC subtype
tcSource the TC source

Definition at line 359 of file TestCaseBasicPUSTcLoader_1.cpp.


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