fsfw/src/fsfw/tmtcservices/VerificationReporter.h

51 lines
1.8 KiB
C
Raw Normal View History

2020-09-29 13:34:27 +02:00
#ifndef FSFW_TMTCSERVICES_VERIFICATIONREPORTER_H_
#define FSFW_TMTCSERVICES_VERIFICATIONREPORTER_H_
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"
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-21 13:48:58 +02:00
// TODO: The API is a little bit bloated. It might be better to group all the parameters
// into a dedicated struct
2022-07-26 13:59:09 +02:00
ReturnValue_t sendSuccessReport(VerifSuccessParams params) override;
2022-02-02 10:29:30 +01:00
2022-07-26 13:59:09 +02:00
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;
static object_id_t DEFAULT_RECEIVER;
ReturnValue_t initialize() override;
2022-02-02 10:29:30 +01:00
private:
MessageQueueId_t acknowledgeQueue;
};
2020-09-29 13:34:27 +02:00
#endif /* FSFW_TMTCSERVICES_VERIFICATIONREPORTER_H_ */