2022-07-20 22:21:15 +02:00
|
|
|
#ifndef FSFW_TMTCPACKET_TMSENDHELPER_H
|
|
|
|
#define FSFW_TMTCPACKET_TMSENDHELPER_H
|
|
|
|
|
|
|
|
#include "TmTcMessage.h"
|
|
|
|
#include "fsfw/internalerror/InternalErrorReporterIF.h"
|
|
|
|
#include "fsfw/ipc/MessageQueueIF.h"
|
|
|
|
#include "fsfw/ipc/messageQueueDefinitions.h"
|
|
|
|
#include "fsfw/returnvalues/HasReturnvaluesIF.h"
|
|
|
|
|
|
|
|
class TmSendHelper {
|
|
|
|
public:
|
2022-07-25 20:31:06 +02:00
|
|
|
TmSendHelper();
|
|
|
|
TmSendHelper(MessageQueueIF& queue, InternalErrorReporterIF& reporter,
|
2022-07-25 19:36:56 +02:00
|
|
|
MessageQueueId_t tmtcMsgDest);
|
2022-07-25 20:31:06 +02:00
|
|
|
TmSendHelper(MessageQueueIF& queue, InternalErrorReporterIF& reporter);
|
|
|
|
explicit TmSendHelper(InternalErrorReporterIF& reporter);
|
2022-07-25 14:31:57 +02:00
|
|
|
|
2022-07-25 20:31:06 +02:00
|
|
|
void setMsgQueue(MessageQueueIF& queue);
|
2022-07-26 11:09:57 +02:00
|
|
|
[[nodiscard]] MessageQueueIF* getMsgQueue() const;
|
2022-07-25 20:31:06 +02:00
|
|
|
|
|
|
|
void setDefaultDestination(MessageQueueId_t msgDest);
|
|
|
|
[[nodiscard]] MessageQueueId_t getDefaultDestination() const;
|
|
|
|
[[nodiscard]] bool areFaultsIgnored() const;
|
|
|
|
void ignoreFaults();
|
|
|
|
void dontIgnoreFaults();
|
2022-07-26 18:46:28 +02:00
|
|
|
void setInternalErrorReporter(InternalErrorReporterIF& reporter);
|
2022-07-25 20:31:06 +02:00
|
|
|
[[nodiscard]] InternalErrorReporterIF* getInternalErrorReporter() const;
|
2022-07-25 14:31:57 +02:00
|
|
|
ReturnValue_t sendPacket(MessageQueueId_t dest, const store_address_t& storeId);
|
2022-07-20 22:21:15 +02:00
|
|
|
ReturnValue_t sendPacket(const store_address_t& storeId);
|
|
|
|
|
|
|
|
private:
|
2022-07-25 20:31:06 +02:00
|
|
|
MessageQueueId_t defaultDest = MessageQueueIF::NO_QUEUE;
|
2022-07-25 14:04:06 +02:00
|
|
|
bool ignoreFault = false;
|
|
|
|
MessageQueueIF* queue = nullptr;
|
2022-07-25 20:31:06 +02:00
|
|
|
InternalErrorReporterIF* errReporter = nullptr;
|
2022-07-20 22:21:15 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // FSFW_TMTCPACKET_TMSENDHELPER_H
|