#include <PUSTelecommand.h>
Inheritance diagram for PUSTelecommand:
This class implements the attributes defined by the more generic Telecommand
superclass in a manner that ensures compatibility with the Packet Utilization Standard (PUS). Only the PUS attributes that are relevant to an application process are modelled by this class.
The mapping between the attributes defined by the Telecommand
superclass and the attributes mandated by the PUS is as follows:<ul> The packet ID PUS attribute has a fixed value for all telecommands in the same application process and it is therefore implemented as a static attribute. The packet sequence control PUS attribute is mapped to the telecommand identifier attribute of the Telecommand
superclass. The acknowledge field PUS attribute is mapped to the acknowledge level attribute of the Telecommand
superclass. The service type PUS attributes is mapped to the telecommand type attribute of the Telecommand
superclass. The service subtype PUS attributes is mapped to the telecommand subtype attribute of the Telecommand
superclass. The source PUS attribute is mapped to the telecommand source attribute of the Telecommand
superclass. The mapping of the PUS acknowledge flags onto the acknowledge level attribute is done in a manner that is completely transparent to the clients of this class.
This class defines a default structure of the telecommand validity check. The class defines an internal variable to hold the value of the validity check code and initializes it to zero. A protected method is offered to set the value of the validity check code. The vallidty check returns "telecommand is valid" if the value of the validity check code is equal to zero. The idea is that validity checking in a PUS telecommand is done when its application data are loaded (using the raw data load service). During the load operation, the telecommand interprets the data and checks their validity. If the data are found to be invalid, then the validity check code is set to a non-zero value.
Definition at line 58 of file PUSTelecommand.h.
Public Member Functions | |
PUSTelecommand (void) | |
Instantiate a PUS telecommand. | |
virtual bool | isValid (void) |
Execute the validity check on the telecommand. | |
virtual TD_CheckCode | getValidityCheckCode (void) const |
Return the validity check code for the telecommand. | |
virtual TD_TelecommandId | getTelecommandId (void) const |
Getter method for the telecommand identifier. | |
virtual void | setTelecommandId (TD_TelecommandId tcIdentifier) |
Setter method for the telecommand identifier. | |
virtual TD_TelecommandType | getType (void) const |
Getter method for the telecommand type. | |
virtual void | setType (TD_TelecommandType tcType) |
Setter method for the telecommand type. | |
virtual TD_TelecommandSubType | getSubType (void) const |
Getter method for the telecommand type. | |
virtual void | setSubType (TD_TelecommandSubType tcSubType) |
Setter method for the telecommand subtype. | |
virtual TD_TelecommandSource | getSource (void) const |
Getter method for the telecommand source. | |
virtual void | setSource (TD_TelecommandSource tcSource) |
Setter method for the telecommand source. | |
virtual void | setAcknowledgeLevel (TD_TelecommandAck ackLevel) |
Set the value of the acknowledge level for this telecommand. | |
virtual TD_TelecommandAck | getAcknowledgeLevel (void) const |
Return the value of the acknowledge level attribute. | |
bool | isAcceptanceAckRequired (void) const |
Return the true if acknowledgement of telecommand acceptance is required. | |
bool | isStartAckRequired (void) const |
Return the true if acknowledgement of telecommand execution start is required. | |
bool | isProgressAckRequired (void) const |
Return the true if acknowledgement of telecommand execution progress is required. | |
bool | isCompletionAckRequired (void) const |
Return the true if acknowledgement of telecommand execution completion is required. | |
virtual bool | isObjectConfigured (void) |
Perform a class-specific configuration check on the telecommand: verify that the telecommand identifier, telecommand type, the telecommand subtype, the telecommand source, and the packet identifier have a legal value. | |
Static Public Member Functions | |
TD_PUSPacketId | getPacketId (void) |
Getter method for the telecommand packet identifier. | |
void | setApplicationId (TD_APID apid) |
Setter method for the application identifier (APID). | |
Protected Member Functions | |
void | setValidityCheckCode (TD_CheckCode valCheckCode) |
Setter method for the validity check code. |
|
Instantiate a PUS telecommand. The telecommand attributes are set as follows:
Definition at line 22 of file PUSTelecommand.cpp. |
|
Return the value of the acknowledge level attribute. Note that methods are also provided to return the values of the individual PUS acknowledge flags.
Reimplemented from Telecommand. Definition at line 98 of file PUSTelecommand.cpp. |
|
Getter method for the telecommand packet identifier. The telecommand packet identifier is assumed to be fixed for all telecommands in the same application process. According to the PUS, the packet identifier consists of the following four fields:
Definition at line 44 of file PUSTelecommand.cpp. |
|
Getter method for the telecommand source.
Reimplemented from Telecommand. Definition at line 84 of file PUSTelecommand.cpp. |
|
Getter method for the telecommand type. In this class, the telecommand subtype is identifed with the telecommand service subtype PUS attribute.
Reimplemented from Telecommand. Definition at line 74 of file PUSTelecommand.cpp. |
|
Getter method for the telecommand identifier. In this class, the telecommand identifier is identified with the packet sequence control PUS attribute.
Reimplemented from Telecommand. Definition at line 54 of file PUSTelecommand.cpp. |
|
Getter method for the telecommand type. In this class, the telecommand type is identifed with the telecommand service type PUS attribute.
Reimplemented from Telecommand. Definition at line 64 of file PUSTelecommand.cpp. |
|
Return the validity check code for the telecommand.
Reimplemented from Telecommand. Reimplemented in DC_TestPUSTelecommand. Definition at line 35 of file PUSTelecommand.cpp. |
|
Return the true if acknowledgement of telecommand acceptance is required. The return value is read from the acknowledge level attribute.
Definition at line 106 of file PUSTelecommand.cpp. |
|
Return the true if acknowledgement of telecommand execution completion is required. The return value is read from the acknowledge level attribute.
Definition at line 114 of file PUSTelecommand.cpp. |
|
Perform a class-specific configuration check on the telecommand: verify that the telecommand identifier, telecommand type, the telecommand subtype, the telecommand source, and the packet identifier have a legal value.
Reimplemented from Telecommand. Reimplemented in DC_PUSClearDataReporting, DC_PUSControlDataReporting, DC_PUSDefineDataReporting, PUSDumpMemory, and PUSMemoryLoad. Definition at line 118 of file PUSTelecommand.cpp. |
|
Return the true if acknowledgement of telecommand execution progress is required. The return value is read from the acknowledge level attribute.
Definition at line 110 of file PUSTelecommand.cpp. |
|
Return the true if acknowledgement of telecommand execution start is required. The return value is read from the acknowledge level attribute.
Definition at line 102 of file PUSTelecommand.cpp. |
|
Execute the validity check on the telecommand.
This method returns "telecommand valid" if the validity check code is equal to zero. The validity check code is computed in method
Reimplemented from Telecommand. Reimplemented in DC_TestPUSTelecommand. Definition at line 31 of file PUSTelecommand.cpp. |
|
Set the value of the acknowledge level for this telecommand. The acknowledge level implements the PUS acknowledge field as follows:
Reimplemented from Telecommand. Definition at line 94 of file PUSTelecommand.cpp. |
|
Setter method for the application identifier (APID). The APID is used to construct the telecommand packet identifier. The APID is placed in the 11 least-significant bits of the PUS packet identifier. A pseudo-code implementation for this method is as follows: packetId = 2**12+2**11; // set the fixed part of the packet ID packetId = packetId + apid; // set the APID part of the packet IDThe APID should be smaller than 2**11.
Definition at line 48 of file PUSTelecommand.cpp. |
|
Setter method for the telecommand source.
Reimplemented from Telecommand. Definition at line 89 of file PUSTelecommand.cpp. |
|
Setter method for the telecommand subtype.
Reimplemented from Telecommand. Definition at line 79 of file PUSTelecommand.cpp. |
|
Setter method for the telecommand identifier.
Reimplemented from Telecommand. Definition at line 59 of file PUSTelecommand.cpp. |
|
Setter method for the telecommand type.
Reimplemented from Telecommand. Definition at line 69 of file PUSTelecommand.cpp. |
|
Setter method for the validity check code.
This method would normally be called by the data load service (method
Reimplemented in DC_TestPUSTelecommand. Definition at line 39 of file PUSTelecommand.cpp. |