#include <TestCasePUSFull.h>
Inheritance diagram for TestCasePUSFull:
The test set-up procedure creates and configures several PUS-related components:
DC_BasicPUSTcLoader
DC_PUSTelemetryModeManager
DC_PUSTmLogger
DC_PUSEventRepository
DC_DummyObsClock
CC_RootObject
which is then unloaded in the shutdown procedure. All the above items are created as static instances and are accessible through getter methods defined by this class. This class is especially useful for test cases that want to perform end-to-end tests of PUS-related functionalities (many components they require are already instantiated and configured) and generally for test cases that exercise PUS-related functionalities.
In order to facilitate the task of the test developers, this class offers utility methods to load the telecommand load area associated to the telecommand loader with data representing instances of several types of telecommand packets. The telecommand packet data are loaded in the command load area associated to the telecommand loader managed by this class. This class is responsible for managing the command load area. It updates its first byte that holds the number of telecommand packets currently stored in the command area and it maintains a command area position index that points to the location in the command area where the next telecommand packet should be written. The position index is initialized to 1 and can be reset with method resetCommandLoadArea
. The utility methods write both the header and the application data part of the telecommand packet. In general, except for the acknowledge field (which is specified by the caller), all other information in the telecommand packet header is given fixed default values. The header is written by method writeTcHeader
.
If there is no space left in the command load area to store the telecommand packet specified by the caller of this method, then the method returns a value of false. Otherwise, the telecommand is written to the command load area and a value of true is returned.
Definition at line 63 of file TestCasePUSFull.h.
Public Member Functions | |
TestCasePUSFull (int testId, char *testName) | |
Set the identifier and the name of the test case. | |
virtual bool | setUpTestCase (void) |
Call the test setup service of the super class and then create and configure the components listed in the class comment. | |
virtual bool | shutDownTestCase (void) |
Restore the old event repository that was loaded at the time this test case was started. | |
CC_TelecommandManager * | getTelecommandManager (void) const |
Return the telecommand manager created by the initialization procedure of this test case. | |
CC_TelemetryManager * | getTelemetryManager (void) const |
Return the telemetry manager created by the initialization procedure of this test case. | |
DC_PUSTelemetryModeManager * | getTelemetryModeManager (void) const |
Return the telemetry mode manager created by the initialization procedure of this test case. | |
CC_ManoeuvreManager * | getManoeuvreManager (void) const |
Return the manoeuvre manager created by the initialization procedure of this test case. | |
DC_BasicPUSTcLoader * | getTcLoader (void) const |
Return the telecommand loader created by the initialization procedure of this test case. | |
DC_PUSTmLogger * | getTmStream (void) const |
Return the telemetry stream created by the initialization procedure of this test case. | |
DC_DummyObsClock * | getObsClock (void) const |
Return the OBS clock created by the initialization procedure of this test case. | |
DC_PUSEventRepository * | getEventRepository (void) const |
Return the PUS Event Repository created by the initialization procedure of this test case. | |
bool | writeTestPUSTelecommand (unsigned char ackField, unsigned int execCounter, bool execCheckVal, bool valCheckVal, TD_CheckCode execCheckCode, TD_CheckCode valCheckCode, bool execOutcome, unsigned short packetSeqControl) |
Load the command load area with data representing a DC_TestPUSTelecommand telecommand packet. | |
bool | writePUSDefineDataReporting (unsigned char ackField, TD_PUSCollectionInterval collectionInterval, TD_SID sid, TD_DataPoolId par, unsigned short packetSeqControl, TD_TelecommandSubType tcSubType) |
Load the command load area with data representing a DC_PUSDefineDataReporting telecommand packet. | |
bool | writePUSDataReportingControl (unsigned char ackField, unsigned char NSID, TD_SID *sid, TD_TelecommandSubType tcSubType, unsigned short packetSeqControl) |
Load the command load area with data representing either a DC_PUSControlDataReporting , or a DC_PUSClearDataReporting , or a DC_PUSRequestDataReporting telecommand packet. | |
void | resetCommandLoadArea () |
Clear the command load area. | |
Protected Member Functions | |
void | writeTcHeader (unsigned short length, unsigned short packetSeqControl) |
Helper method that writes a default telecommand packet header to the telecommand load. |
|
Set the identifier and the name of the test case.
Definition at line 47 of file TestCasePUSFull.cpp. |
|
Return the PUS Event Repository created by the initialization procedure of this test case.
Definition at line 210 of file TestCasePUSFull.cpp. |
|
Return the manoeuvre manager created by the initialization procedure of this test case.
Definition at line 194 of file TestCasePUSFull.cpp. |
|
Return the OBS clock created by the initialization procedure of this test case.
Definition at line 206 of file TestCasePUSFull.cpp. |
|
Return the telecommand loader created by the initialization procedure of this test case.
Definition at line 198 of file TestCasePUSFull.cpp. |
|
Return the telecommand manager created by the initialization procedure of this test case.
Definition at line 182 of file TestCasePUSFull.cpp. |
|
Return the telemetry manager created by the initialization procedure of this test case.
Definition at line 186 of file TestCasePUSFull.cpp. |
|
Return the telemetry mode manager created by the initialization procedure of this test case.
Definition at line 190 of file TestCasePUSFull.cpp. |
|
Return the telemetry stream created by the initialization procedure of this test case.
Definition at line 202 of file TestCasePUSFull.cpp. |
|
Clear the command load area. The command load area position index is reset to one and the first byte of the command load area is reset to zero. Definition at line 214 of file TestCasePUSFull.cpp. |
|
Call the test setup service of the super class and then create and configure the components listed in the class comment.
Component creation and configuration of some parameters is only performed the first time this method is executed. Configuration parameters that can updated once are instead set at every activation. This ensures that all derived test cases can rely on the same initial configuration. The values of the configuration parameters are constants that are defined in file Reimplemented from TestCaseWithFactories. Definition at line 52 of file TestCasePUSFull.cpp. |
|
Load the command load area with data representing either a The telecommand content is specified by its subtype and by an array that holds the SIDs of data reporting telecommands that must be controlled, cleared, or requested.
Definition at line 268 of file TestCasePUSFull.cpp. |
|
Load the command load area with data representing a A simple instance of the telecommand is written that includes only one parameter to be sample at every collection interval.
Definition at line 305 of file TestCasePUSFull.cpp. |
|
Helper method that writes a default telecommand packet header to the telecommand load. This method is called by the methods that write telecommands packets to the telecommand load area.
Definition at line 219 of file TestCasePUSFull.cpp. |
|
Load the command load area with data representing a
Definition at line 228 of file TestCasePUSFull.cpp. |