fsfw/src/fsfw/tmtcservices/TmSendHelper.h

39 lines
1.4 KiB
C
Raw Normal View History

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,
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);
[[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;
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