#include <DC_PUSEventRepository.h>
Inheritance diagram for DC_PUSEventRepository:
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".
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.
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_TelemetryManager * | getTelemetryManager (void) const |
Return the telemetry manager component. |
|
Instantiate a PUS event repository.
The PUS event repository maintains as an internal variable an instance of class Definition at line 25 of file DC_PUSEventRepository.cpp. |
|
Implement the event creation service for event originators of type other than 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.
Reimplemented from DC_EventRepository. Definition at line 200 of file DC_PUSEventRepository.cpp. |
|
Implement the event creation service for event originators of type
The implementation logic of this method is the same as for the
Definition at line 124 of file DC_PUSEventRepository.cpp. |
|
Implement the event creation service for event originators of type 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.
Definition at line 29 of file DC_PUSEventRepository.cpp. |
|
Return the telemetry manager component.
Definition at line 209 of file DC_PUSEventRepository.cpp. |
|
Perform a class-specific configuration check on a repository object: verify that the telemetry manager plug-in component has been loaded.
Reimplemented from DC_EventRepository. Definition at line 214 of file DC_PUSEventRepository.cpp. |
|
Load the telemetry manager component. The event repository needs access to the telemetry manager to dispatch the telecommand verification telemetry packet.
Definition at line 204 of file DC_PUSEventRepository.cpp. |