create new TmSendHelper
This commit is contained in:
parent
d80941514f
commit
9860061fc6
@ -6,27 +6,34 @@
|
|||||||
#include "fsfw/storagemanager/StorageManagerIF.h"
|
#include "fsfw/storagemanager/StorageManagerIF.h"
|
||||||
#include "fsfw/tmtcpacket/pus/tm/PusTmCreator.h"
|
#include "fsfw/tmtcpacket/pus/tm/PusTmCreator.h"
|
||||||
|
|
||||||
|
class TmStoreAndSendWrapper {
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
class TmSendHelper {
|
||||||
|
public:
|
||||||
|
TmSendHelper(MessageQueueId_t tmtcMsgDest,
|
||||||
|
MessageQueueId_t tmtcMsgSrc, InternalErrorReporterIF* reporter);
|
||||||
|
void setMsgDestination(MessageQueueId_t msgDest);
|
||||||
|
void setMsgSource(MessageQueueId_t msgSrc);
|
||||||
|
void setInternalErrorReporter(InternalErrorReporterIF* reporter);
|
||||||
|
ReturnValue_t sendPacket();
|
||||||
|
private:
|
||||||
|
MessageQueueId_t tmtcMsgDest;
|
||||||
|
MessageQueueId_t tmtcMsgSrc;
|
||||||
|
InternalErrorReporterIF* errReporter;
|
||||||
|
};
|
||||||
|
|
||||||
// TODO: Serializing a packet into a store and sending the message are two different tasks
|
// TODO: Serializing a packet into a store and sending the message are two different tasks
|
||||||
// Move them into separate classes
|
// Move them into separate classes
|
||||||
class TmStoreHelper {
|
class TmStoreHelper {
|
||||||
public:
|
public:
|
||||||
TmStoreHelper(StorageManagerIF* tmStore, MessageQueueId_t tmtcMsgDest,
|
TmStoreHelper(StorageManagerIF* tmStore);
|
||||||
MessageQueueId_t tmtcMsgSrc, InternalErrorReporterIF* reporter);
|
|
||||||
|
|
||||||
void setInternalErrorReporter(InternalErrorReporterIF* reporter);
|
|
||||||
void setMsgDestination(MessageQueueId_t msgDest);
|
|
||||||
void setMsgSource(MessageQueueId_t msgSrc);
|
|
||||||
void preparePacket(uint16_t apid, uint8_t service, uint8_t subservice, uint16_t counter);
|
void preparePacket(uint16_t apid, uint8_t service, uint8_t subservice, uint16_t counter);
|
||||||
ReturnValue_t sendPacket();
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
PusTmParams params{};
|
PusTmParams params{};
|
||||||
PusTmCreator creator;
|
PusTmCreator creator;
|
||||||
|
|
||||||
bool doErrorReporting = true;
|
|
||||||
MessageQueueId_t tmtcMsgDest;
|
|
||||||
MessageQueueId_t tmtcMsgSrc;
|
|
||||||
InternalErrorReporterIF* errReporter;
|
|
||||||
store_address_t currentAddr{};
|
store_address_t currentAddr{};
|
||||||
StorageManagerIF* tmStore;
|
StorageManagerIF* tmStore;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user