2020-09-29 13:34:27 +02:00
|
|
|
#ifndef FSFW_TMTCSERVICES_VERIFICATIONREPORTER_H_
|
|
|
|
#define FSFW_TMTCSERVICES_VERIFICATIONREPORTER_H_
|
2016-06-15 23:48:41 +02:00
|
|
|
|
2020-08-13 20:53:35 +02:00
|
|
|
#include "PusVerificationReport.h"
|
2022-07-26 13:59:09 +02:00
|
|
|
#include "VerificationReporterIF.h"
|
2021-07-13 20:58:45 +02:00
|
|
|
#include "fsfw/objectmanager/ObjectManagerIF.h"
|
2022-07-26 13:59:09 +02:00
|
|
|
#include "fsfw/objectmanager/SystemObject.h"
|
2022-07-19 18:13:25 +02:00
|
|
|
#include "fsfw/tmtcpacket/pus/tc/PusTcCreator.h"
|
2022-07-26 13:59:09 +02:00
|
|
|
#include "fsfw/tmtcservices/AcceptsVerifyMessageIF.h"
|
2018-07-12 16:29:32 +02:00
|
|
|
|
2022-07-26 18:58:36 +02:00
|
|
|
namespace Factory {
|
|
|
|
void setStaticFrameworkObjectIds();
|
|
|
|
}
|
|
|
|
|
2020-09-29 13:34:27 +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.
|
|
|
|
*
|
|
|
|
*/
|
2022-07-26 13:59:09 +02:00
|
|
|
class VerificationReporter : public SystemObject, public VerificationReporterIF {
|
2022-07-26 18:58:36 +02:00
|
|
|
friend void Factory::setStaticFrameworkObjectIds();
|
|
|
|
|
2022-02-02 10:29:30 +01:00
|
|
|
public:
|
2022-08-16 17:09:22 +02:00
|
|
|
explicit VerificationReporter(object_id_t objectId = DEFAULT_REPORTER,
|
|
|
|
AcceptsVerifyMessageIF* receiver = nullptr);
|
2022-07-26 13:59:09 +02:00
|
|
|
~VerificationReporter() override;
|
|
|
|
|
|
|
|
void setReceiver(AcceptsVerifyMessageIF& receiver);
|
2022-02-02 10:29:30 +01:00
|
|
|
|
2022-07-26 13:59:09 +02:00
|
|
|
ReturnValue_t sendSuccessReport(VerifSuccessParams params) override;
|
|
|
|
ReturnValue_t sendFailureReport(VerifFailureParams params) override;
|
2022-02-02 10:29:30 +01:00
|
|
|
|
2022-07-26 18:58:36 +02:00
|
|
|
static object_id_t DEFAULT_REPORTER;
|
2022-07-26 17:41:10 +02:00
|
|
|
static object_id_t DEFAULT_RECEIVER;
|
|
|
|
ReturnValue_t initialize() override;
|
|
|
|
|
2022-02-02 10:29:30 +01:00
|
|
|
private:
|
2022-08-18 11:19:42 +02:00
|
|
|
MessageQueueId_t acknowledgeQueue = MessageQueueIF::NO_QUEUE;
|
2016-06-15 23:48:41 +02:00
|
|
|
};
|
|
|
|
|
2020-09-29 13:34:27 +02:00
|
|
|
#endif /* FSFW_TMTCSERVICES_VERIFICATIONREPORTER_H_ */
|