eive-obsw/mission/tmtc/TmFunnelBase.h
Robin Mueller d9453c3b83
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
absolutely magnificent
2022-12-19 14:40:27 +01:00

36 lines
1.3 KiB
C++

#ifndef MISSION_TMTC_TMFUNNELBASE_H_
#define MISSION_TMTC_TMFUNNELBASE_H_
#include <fsfw/objectmanager/SystemObject.h>
#include <fsfw/storagemanager/StorageManagerIF.h>
#include <fsfw/tmstorage/TmStoreFrontendSimpleIF.h>
#include <fsfw/tmtcservices/AcceptsTelemetryIF.h>
#include <fsfw/tmtcservices/TmTcMessage.h>
#include <vector>
class TmFunnelBase : public TmStoreFrontendSimpleIF,
public AcceptsTelemetryIF,
public SystemObject {
public:
TmFunnelBase(object_id_t objectId, StorageManagerIF& tmStore, uint32_t tmMsgDepth,
uint32_t tcMsgDepth, StorageManagerIF& ipcStore);
void addDestination(const AcceptsTelemetryIF& downlinkDestination, uint8_t vcid = 0);
ReturnValue_t sendPacketToDestinations(store_address_t origStoreId, TmTcMessage& message,
const uint8_t* packetData, size_t size);
[[nodiscard]] MessageQueueId_t getCommandQueue() const override;
[[nodiscard]] MessageQueueId_t getReportReceptionQueue(uint8_t virtualChannel) const override;
virtual ~TmFunnelBase();
protected:
StorageManagerIF& tmStore;
StorageManagerIF& ipcStore;
std::vector<std::pair<MessageQueueId_t, uint8_t>> destinations;
MessageQueueIF* tcQueue = nullptr;
MessageQueueIF* tmQueue = nullptr;
};
#endif /* MISSION_TMTC_TMFUNNELBASE_H_ */