2020-07-08 13:29:57 +02:00
|
|
|
#ifndef FRAMEWORK_TMTCSERVICES_VERIFICATIONREPORTER_H_
|
|
|
|
#define FRAMEWORK_TMTCSERVICES_VERIFICATIONREPORTER_H_
|
2016-06-15 23:48:41 +02:00
|
|
|
|
|
|
|
#include <framework/objectmanager/ObjectManagerIF.h>
|
|
|
|
#include <framework/tmtcservices/PusVerificationReport.h>
|
|
|
|
|
2018-07-12 16:29:32 +02:00
|
|
|
namespace Factory{
|
|
|
|
void setStaticFrameworkObjectIds();
|
|
|
|
}
|
|
|
|
|
2020-07-08 13:29:57 +02:00
|
|
|
/**
|
|
|
|
* @brief This helper object is used to forward verification messages
|
|
|
|
* which are generated by the Flight Software Framework.
|
|
|
|
* @details
|
|
|
|
* The messages can be relayed to an arbitrary object, for example a dedicated
|
|
|
|
* Verification Reporter. The destination is set by setting the static framework
|
|
|
|
* Id VerificationReporter::messageReceiver. The default verification reporter
|
|
|
|
* will be the PUS service 1, which sends verification messages according
|
|
|
|
* to the PUS standard.
|
|
|
|
*
|
|
|
|
*/
|
2016-06-15 23:48:41 +02:00
|
|
|
class VerificationReporter {
|
2018-07-12 16:29:32 +02:00
|
|
|
friend void (Factory::setStaticFrameworkObjectIds)();
|
2016-06-15 23:48:41 +02:00
|
|
|
public:
|
|
|
|
VerificationReporter();
|
|
|
|
virtual ~VerificationReporter();
|
2020-07-08 13:29:57 +02:00
|
|
|
|
|
|
|
void sendSuccessReport( uint8_t set_report_id, TcPacketBase* current_packet,
|
|
|
|
uint8_t set_step = 0 );
|
|
|
|
void sendSuccessReport(uint8_t set_report_id, uint8_t ackFlags,
|
|
|
|
uint16_t tcPacketId, uint16_t tcSequenceControl,
|
|
|
|
uint8_t set_step = 0);
|
|
|
|
|
|
|
|
void sendFailureReport( uint8_t report_id, TcPacketBase* current_packet,
|
|
|
|
ReturnValue_t error_code = 0,
|
|
|
|
uint8_t step = 0, uint32_t parameter1 = 0,
|
|
|
|
uint32_t parameter2 = 0 );
|
2016-06-15 23:48:41 +02:00
|
|
|
void sendFailureReport(uint8_t report_id,
|
2020-07-08 13:29:57 +02:00
|
|
|
uint8_t ackFlags, uint16_t tcPacketId, uint16_t tcSequenceControl,
|
|
|
|
ReturnValue_t error_code = 0, uint8_t step = 0,
|
2016-06-15 23:48:41 +02:00
|
|
|
uint32_t parameter1 = 0, uint32_t parameter2 = 0);
|
2020-07-08 13:29:57 +02:00
|
|
|
|
2016-06-15 23:48:41 +02:00
|
|
|
void initialize();
|
2020-07-08 13:29:57 +02:00
|
|
|
|
2018-07-12 16:29:32 +02:00
|
|
|
private:
|
|
|
|
static object_id_t messageReceiver;
|
|
|
|
MessageQueueId_t acknowledgeQueue;
|
2016-06-15 23:48:41 +02:00
|
|
|
};
|
|
|
|
|
2020-07-08 13:29:57 +02:00
|
|
|
#endif /* FRAMEWORK_TMTCSERVICES_VERIFICATIONREPORTER_H_ */
|