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

PUSTelecommand Class Reference
[Packet Utilization Standard (PUS)Telecommand Management]

#include <PUSTelecommand.h>

Inheritance diagram for PUSTelecommand:

Telecommand PunctualAction CC_RootObject DC_DummyPUSTelecommand DC_PUSClearDataReporting DC_PUSControlDataReporting DC_PUSDefineDataReporting DC_TestPUSTelecommand PUSDumpMemory PUSFunctionManagement PUSMemoryLoad List of all members.

Detailed Description

Base class from which all PUS telecommand classes are derived.

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.

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

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.


Constructor & Destructor Documentation

PUSTelecommand::PUSTelecommand void   ) 
 

Instantiate a PUS telecommand.

The telecommand attributes are set as follows:

  • The telecommand identifier is set to a non-legal value to indicate that the telecommand component is not yet configured
  • The telecommand type is set to a non-legal value to indicate that the telecommand component is not yet configured
  • The telecommand subtype is set to a non-legal value to indicate that the telecommand component is not yet configured
  • The telecommand source is set to a non-legal value to indicate that the telecommand component is not yet configured
  • The acknowledge flags are set to "false" (no acknowledge is required)
  • The validity check code is initialized to zero (telecommand is valid)
Note that the packet identifier (a static attribute) is initialized to an illegal value to indicate that the component is not yet initialized.

Definition at line 22 of file PUSTelecommand.cpp.


Member Function Documentation

TD_TelecommandAck PUSTelecommand::getAcknowledgeLevel void   )  const [virtual]
 

Return the value of the acknowledge level attribute.

Note that methods are also provided to return the values of the individual PUS acknowledge flags.

See also:
setAcknowledgeLevel
Returns:
the value of the acknowledge level attribute

Reimplemented from Telecommand.

Definition at line 98 of file PUSTelecommand.cpp.

TD_TelecommandId PUSTelecommand::getPacketId void   )  [static]
 

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:

  • The version number: this field is fixed and equal to 0
  • The type: this field is fixed and equal to 1
  • The data field header: this field is fixed and equal to 1 (indicating that a telecommand packet always has a secondary header)
  • The application ID: this field is fixed within the application process and it is equal to the application identifier
See also:
setApplicationId
Returns:
the packet identifier

Definition at line 44 of file PUSTelecommand.cpp.

TD_TelecommandSource PUSTelecommand::getSource void   )  const [virtual]
 

Getter method for the telecommand source.

Returns:
the telecommand source

Reimplemented from Telecommand.

Definition at line 84 of file PUSTelecommand.cpp.

TD_TelecommandSubType PUSTelecommand::getSubType void   )  const [virtual]
 

Getter method for the telecommand type.

In this class, the telecommand subtype is identifed with the telecommand service subtype PUS attribute.

Returns:
the telecommand subtype

Reimplemented from Telecommand.

Definition at line 74 of file PUSTelecommand.cpp.

TD_TelecommandId PUSTelecommand::getTelecommandId void   )  const [virtual]
 

Getter method for the telecommand identifier.

In this class, the telecommand identifier is identified with the packet sequence control PUS attribute.

Returns:
the telecommand identifier

Reimplemented from Telecommand.

Definition at line 54 of file PUSTelecommand.cpp.

TD_TelecommandType PUSTelecommand::getType void   )  const [virtual]
 

Getter method for the telecommand type.

In this class, the telecommand type is identifed with the telecommand service type PUS attribute.

Returns:
the telecommand type

Reimplemented from Telecommand.

Definition at line 64 of file PUSTelecommand.cpp.

TD_CheckCode PUSTelecommand::getValidityCheckCode void   )  const [virtual]
 

Return the validity check code for the telecommand.

See also:
setValidityCheckCode
Returns:
the validity check code

Reimplemented from Telecommand.

Reimplemented in DC_TestPUSTelecommand.

Definition at line 35 of file PUSTelecommand.cpp.

bool PUSTelecommand::isAcceptanceAckRequired void   )  const
 

Return the true if acknowledgement of telecommand acceptance is required.

The return value is read from the acknowledge level attribute.

See also:
setAcknowledgeLevel
Returns:
the value of the acceptance acknowledge flag

Definition at line 106 of file PUSTelecommand.cpp.

bool PUSTelecommand::isCompletionAckRequired void   )  const
 

Return the true if acknowledgement of telecommand execution completion is required.

The return value is read from the acknowledge level attribute.

See also:
setAcknowledgeLevel
Returns:
the value of the completion acknowledge flag

Definition at line 114 of file PUSTelecommand.cpp.

bool PUSTelecommand::isObjectConfigured void   )  [virtual]
 

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.

Returns:
true if the component is configured, false otherwise.

Reimplemented from Telecommand.

Reimplemented in DC_PUSClearDataReporting, DC_PUSControlDataReporting, DC_PUSDefineDataReporting, PUSDumpMemory, and PUSMemoryLoad.

Definition at line 118 of file PUSTelecommand.cpp.

bool PUSTelecommand::isProgressAckRequired void   )  const
 

Return the true if acknowledgement of telecommand execution progress is required.

The return value is read from the acknowledge level attribute.

See also:
setAcknowledgeLevel
Returns:
the value of the progress acknowledge flag

Definition at line 110 of file PUSTelecommand.cpp.

bool PUSTelecommand::isStartAckRequired void   )  const
 

Return the true if acknowledgement of telecommand execution start is required.

The return value is read from the acknowledge level attribute.

See also:
setAcknowledgeLevel
Returns:
the value of the start acknowledge flag

Definition at line 102 of file PUSTelecommand.cpp.

bool PUSTelecommand::isValid void   )  [virtual]
 

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 setRawData.

See also:
setValidityCheckCode
Returns:
true if the telecommand is valid, false otherwise

Reimplemented from Telecommand.

Reimplemented in DC_TestPUSTelecommand.

Definition at line 31 of file PUSTelecommand.cpp.

void PUSTelecommand::setAcknowledgeLevel TD_TelecommandAck  ackLevel  )  [virtual]
 

Set the value of the acknowledge level for this telecommand.

The acknowledge level implements the PUS acknowledge field as follows:

  • Bit 0 represents the acceptance acknowledge flag
  • Bit 1 represents the start acknowledge flag
  • Bit 2 represents the progress acknowledge flag
  • Bit 3 represents the completion acknowledge flag
Bit 0 is the least-significant bit.
See also:
getAcknowledgeLevel
Parameters:
ackLevel the new value of the acknowledge level attribute

Reimplemented from Telecommand.

Definition at line 94 of file PUSTelecommand.cpp.

void PUSTelecommand::setApplicationId TD_APID  apid  )  [static]
 

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 ID 
The APID should be smaller than 2**11.
See also:
getPacketId
Parameters:
apid the identifier of the application for which the telecommand is intended

Definition at line 48 of file PUSTelecommand.cpp.

void PUSTelecommand::setSource TD_TelecommandSource  tcSource  )  [virtual]
 

Setter method for the telecommand source.

See also:
getSource
Parameters:
tcSource the telecommand source

Reimplemented from Telecommand.

Definition at line 89 of file PUSTelecommand.cpp.

void PUSTelecommand::setSubType TD_TelecommandSubType  tcSubType  )  [virtual]
 

Setter method for the telecommand subtype.

See also:
getSubType
Parameters:
tcSubType the telecommand subtype

Reimplemented from Telecommand.

Definition at line 79 of file PUSTelecommand.cpp.

void PUSTelecommand::setTelecommandId TD_TelecommandId  tcIdentifier  )  [virtual]
 

Setter method for the telecommand identifier.

See also:
getTelecommandId
Parameters:
tcIdentifier the telecommand identifier

Reimplemented from Telecommand.

Definition at line 59 of file PUSTelecommand.cpp.

void PUSTelecommand::setType TD_TelecommandType  tcType  )  [virtual]
 

Setter method for the telecommand type.

See also:
getType
Parameters:
tcType the telecommand type

Reimplemented from Telecommand.

Definition at line 69 of file PUSTelecommand.cpp.

void PUSTelecommand::setValidityCheckCode TD_CheckCode  valCheckCode  )  [protected]
 

Setter method for the validity check code.

This method would normally be called by the data load service (method setRawData) when it detects an inconsistency or some other problem in the data being loaded. The value of the code indicates the type of problem.

Parameters:
valCheckCode the validity check code

Reimplemented in DC_TestPUSTelecommand.

Definition at line 39 of file PUSTelecommand.cpp.


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