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

DC_PUSEventRepository Class Reference
[Packet Utilization Standard (PUS)]

#include <DC_PUSEventRepository.h>

Inheritance diagram for DC_PUSEventRepository:

DC_EventRepository CC_RootObject List of all members.

Detailed Description

Event repository for PUS applications.

This event repository differs from the basic repository implemented by its base class in that it processes telecommand-related events separately from other events. For this purpose, it adds two new create methods that intercept events generated by PUS telecommands (i.e. events whose originator is a component of type PUSTelecommand) and by PUS telecommand manoeuvres (i.e. events whose originator is a component of type PUSTcManoeuvre). Events of this kind signal a change in execution status of a PUS telecommand. Their detection results in the generation of a telecommand verification telemetry packet (instance of class DC_PUSTcVerificationPacket).

The events that are intercepted by this repository and the way they are interpreted is as follows:<ul> EVT_TC_LOADED is interpreted as: "telecommand acceptance - success". EVT_TC_NOT_VALID is interpreted as: "telecommand acceptance - failure". The error code in the verification telemetry packet is the validity check code of the telecommand if this is different from zero, otherwise it is the event identifier EVT_TC_NOT_VALID. EVT_TC_LIST_FULL is interpreted as: "telecommand acceptance - failure". The error code in the verification telemetry packet is the event identifier EVT_TC_LIST_FULL. EVT_MAN_STARTED is interpreted as: "telecommand execution start - success". This event identifier can only be generated for manoeuvre telecommands. EVT_MAN_LIST_FULL is interpreted as: "telecommand execution start - failure". The error code in the verification telemetry packet is the event identifier EVT_MAN_LIST_FULL. This event identifier can only be generated for manoeuvre telecommands. EVT_TC_EXEC_CHECK_FAIL is interpreted as: "telecommand execution start - failure". The error code in the verification telemetry packet is the execution check code of the telecommand if this is different from zero, otherwise it is the event identifier EVT_TC_EXEC_CHECK_FAIL. EVT_TC_ABORTED is interpreted as: "telecommand execution start - failure". The error code in the verification telemetry packet is the event identifier EVT_TC_ABORTED. EVT_MAN_PROGRESS is interpreted as: "telecommand execution progress - success". This event identifier can only be generated for telemecommand manoeuvres. EVT_TC_EXEC_SUCC is interpreted as: "telecommand execution completion - success". EVT_TC_EXEC_FAIL is interpreted as: "telecommand execution completion - failure". The error code in the verification telemetry packet is the outcome code of the telecommand. EVT_MAN_ABORTED is interpreted as: "telecommand execution progress - failure". The error code in the verification telemetry packet is the continuation check code of the telecommand manoeuvre if this is different from zero, otherwise it is the event identifier EVT_MAN_ABORTED. This event identifier can only be generated for telemecommand manoeuvres. EVT_MAN_TERMINATED is interpreted as: "telecommand execution completion - success". This event identifier can only be generated for telemecommand manoeuvres. For events that indicate "success", the disptaching of the associated telemetry packet is only done if the telecommand had set the associated "acknowledge flag".

Todo:
Verify whether the declaration and implementation of method create(CC_RootObject*,TD_EventId) is really needed (try omitting it on the gnu compiler). Its presence seems unnecessary and it is undesirable because it adds a level of indirection

Modify the processing of the events denoting "success" to include a check on the acknowledge flag of the telecommand that is being verified: a verification packet should only be sent in case of success if this is explicitly requested by the telecommand through its acknowledge flags (see pag. 44 of PUS standard). to most calls of the event creation service.

See also:
PUSTelecommand

PUSTcManoeuvre

DC_PUSTcVerificationPacket

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

Definition at line 79 of file DC_PUSEventRepository.h.

Public Member Functions

 DC_PUSEventRepository (void)
 Instantiate a PUS event repository.

void create (PUSTelecommand *originator, TD_EventType eventId)
 Implement the event creation service for event originators of type PUSTelecommand.

void create (PUSTcManoeuvre *originator, TD_EventType eventId)
 Implement the event creation service for event originators of type PUSTcManoeuvre.

virtual void create (CC_RootObject *originator, TD_EventType eventId)
 Implement the event creation service for event originators of type other than PUSTcManoeuvre or PUSTelecommand.

virtual bool isObjectConfigured (void)
 Perform a class-specific configuration check on a repository object: verify that the telemetry manager plug-in component has been loaded.

void setTelemetryManager (CC_TelemetryManager *pTmManager)
 Load the telemetry manager component.

CC_TelemetryManagergetTelemetryManager (void) const
 Return the telemetry manager component.


Constructor & Destructor Documentation

DC_PUSEventRepository::DC_PUSEventRepository void   ) 
 

Instantiate a PUS event repository.

The PUS event repository maintains as an internal variable an instance of class DC_PUSTcVerificationPacket. This is used to encapsulate the telemetry packet that describes a change in telecommand execution status. This constructor creates and configures this component and sets the class identifier.

Definition at line 25 of file DC_PUSEventRepository.cpp.


Member Function Documentation

void DC_PUSEventRepository::create CC_RootObject originator,
TD_EventType  eventId
[virtual]
 

Implement the event creation service for event originators of type other than PUSTcManoeuvre or PUSTelecommand.

This method simply calls the implementation of the create method in the super class.

Implementation Note: this method is strictly speaking unnecessary because it simply calls the same virtual method in the superclass. However its absence causes a warning (C4264) in the Microsoft Visual Studio compiler.

Parameters:
originator the originator of the event
eventId the event type identifier

Reimplemented from DC_EventRepository.

Definition at line 200 of file DC_PUSEventRepository.cpp.

void DC_PUSEventRepository::create PUSTcManoeuvre originator,
TD_EventType  eventId
 

Implement the event creation service for event originators of type PUSTcManoeuvre.

The implementation logic of this method is the same as for the create(PUSTelecommand*, TD_EventType) method in this same class.

Parameters:
originator the originator of the event
eventId the event type identifier

Definition at line 124 of file DC_PUSEventRepository.cpp.

void DC_PUSEventRepository::create PUSTelecommand originator,
TD_EventType  eventId
 

Implement the event creation service for event originators of type PUSTelecommand.

A pseudo-code implementation for this method is as follows:

  if ( isEnabled() && isEnabled(eventId) ) {
      allocate a TC verification packet from the telemetry packet factory
      if (allocation fails) {
          create((CC_RootObject*)originator,EVT_TM_PCK_ALLOC_FAIL);
          create((CC_RootObject*)originator,eventId); 
          return;
      }
      configure TC verification packet according to value of eventId;
      submit TC verification packet to TM manager for immediate dispatch;
      create((CC_RootObject*)originator,eventId); 
  } 
The mapping of the event identifiers to the configuration of the TC verification packet is explained in the class comment. The last instruction in the "if" clause indicates that the event processing is delegated to the default version of the create method provided by the superclass DC_EventRepositor. If the event is a "success event", then the above processing is only performed if the associated "acknowledge flag" in the telecommand is set.
Parameters:
originator the originator of the event
eventId the event type identifier

Definition at line 29 of file DC_PUSEventRepository.cpp.

CC_TelemetryManager * DC_PUSEventRepository::getTelemetryManager void   )  const
 

Return the telemetry manager component.

See also:
setTelemetryManager
Returns:
the the telemetry manager

Definition at line 209 of file DC_PUSEventRepository.cpp.

bool DC_PUSEventRepository::isObjectConfigured void   )  [virtual]
 

Perform a class-specific configuration check on a repository object: verify that the telemetry manager plug-in component has been loaded.

Returns:
true if the object is configured, false otherwise

Reimplemented from DC_EventRepository.

Definition at line 214 of file DC_PUSEventRepository.cpp.

void DC_PUSEventRepository::setTelemetryManager CC_TelemetryManager pTmManager  ) 
 

Load the telemetry manager component.

The event repository needs access to the telemetry manager to dispatch the telecommand verification telemetry packet.

Parameters:
pTmManager the telemetry manager

Definition at line 204 of file DC_PUSEventRepository.cpp.


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