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

TestCasePUSEventRepository_1 Class Reference

#include <TestCasePUSEventRepository_1.h>

Inheritance diagram for TestCasePUSEventRepository_1:

TestCasePUSFull TestCaseWithFactories TestCaseWithEvtCheck TestCaseGenericSetUp TestCase List of all members.

Detailed Description

Check the functionality of the DC_PUSEventRepository class.

The test case retrieves the following items from its super class TestCasePUSFull or from the telecommand factory:<ul> The PUS event repository One instance of DC_TestPUSTelecommand One instance of DC_DummyConfigurableManoeuvre The following specific checks are then performed:<ol> The correctness of the class identifier of the event repository is checked. The create method for telecommands is called repeatedly with the test telecommand as argument and with all possible event identifiers that this method can handle (see class comment of class DC_PUSEventRepositor for the full list). It is then checked that the correct telemetry package has been loaded in the immediate dispatch queue of the telemetry manager. For one of the repeated calls described at the previous bullet, it is also checked that the event counter is correctly updated and that an event of the correct type is stored in the event repository. Calls with "success events" (events that denote the successful acceptance, start, progress, or completion of a telecommand), the test is repeated twice, first with the associated acknowledge flag in the telecommand set to false and then to true and it is checked that telemetry packet dispatching is only performed in the latter case. A call to the create method for telecommands is performed when there are no more free DC_PUSTcVerificationPackets available in the telemetry factory and it is checked that the correct event is generated. The create method for manoeuvres is called repeatedly with the test telecommand as argument and with all possible event identifiers that this method can handle (see class comment of class DC_PUSEventRepositor for the full list). It is then checked that the correct telemetry package has been loaded in the immediate dispatch queue of the telemetry manager. For one of the repeated calls described at the previous bullet, it is also checked that the event counter is correctly updated and that an event of the correct type is stored in the event repository. Calls with "success events" (events that denote the successful acceptance, start, progress, or completion of a telecommand manoeuvre), the test is repeated twice, first with the associated acknowledge flag in the manoeuvre set to false and then to true and it is checked that telemetry packet dispatching is only performed in the latter case. A call to the create method for manoeuvre is performed when there are no more free DC_PUSTcVerificationPackets available in the telemetry factory and it is checked that the correct event is generated.

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

Definition at line 64 of file TestCasePUSEventRepository_1.h.

Public Member Functions

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

virtual void runTestCase (void)
 Execute the test case.

bool checkTmPacket (DC_PUSEventRepository *pEvtRep, TD_TelemetrySubType tmSubType, TD_TelecommandId tcId, TD_ObsTime tt, TD_CheckCode errCode)
 Check that the telemetry packet loaded by the argument PUS event repository in the telemetry manager is correctly configured.

bool checkNoTmPacket (DC_PUSEventRepository *pEvtRep)
 Check that no telemetry packets were loaded by the argument PUS event repository in the telemetry manager.


Member Function Documentation

bool TestCasePUSEventRepository_1::checkNoTmPacket DC_PUSEventRepository pEvtRep  ) 
 

Check that no telemetry packets were loaded by the argument PUS event repository in the telemetry manager.

The method retrieves the telemetry manager from the PUS event repository and then checks that it does not hold any items in the immediate dispatch queue.

Parameters:
pEvtRep the PUS event repository
Returns:
true if the no telemetry packet are found in the immediate dispatch queue of the telemetry manager

Definition at line 281 of file TestCasePUSEventRepository_1.cpp.

bool TestCasePUSEventRepository_1::checkTmPacket DC_PUSEventRepository pEvtRep,
TD_TelemetrySubType  tmSubType,
TD_TelecommandId  tcId,
TD_ObsTime  tt,
TD_CheckCode  errCode
 

Check that the telemetry packet loaded by the argument PUS event repository in the telemetry manager is correctly configured.

The method retrieves the telemetry manager from the PUS event repository and then retrieves the telemetry packet from the telemetry manager. In addition to checking the parameters explicitly passed to the method, the type of the telemetry packet is also checked.

Parameters:
pEvtRep the PUS event repository
tmSubType the expected subtype of the telemetry packet
tcId the expected identified of the telecommand whose execution is being reported
tt the expected time tag of the telecommand whose execution is being reported
errCode the expected error code of the telecommand (only checked for correctness if different from zero)
Returns:
true if the telemetry packet is configured as expected

Definition at line 245 of file TestCasePUSEventRepository_1.cpp.

void TestCasePUSEventRepository_1::runTestCase void   )  [virtual]
 

Execute the test case.

See class comment for details.

Reimplemented from TestCaseGenericSetUp.

Definition at line 35 of file TestCasePUSEventRepository_1.cpp.


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