eive-obsw/mission/tmtc/TmFunnelBase.cpp
Robin Mueller c4c1f09f2e
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
continue request handling
2022-12-19 13:57:05 +01:00

24 lines
951 B
C++

#include "TmFunnelBase.h"
#include "fsfw/ipc/QueueFactory.h"
TmFunnelBase::TmFunnelBase(object_id_t objectId, StorageManagerIF &tmStore, uint32_t tmMsgDepth,
uint32_t tcMsgDepth, StorageManagerIF &ipcStore)
: SystemObject(objectId), tmStore(tmStore), ipcStore(ipcStore) {
tmQueue = QueueFactory::instance()->createMessageQueue(tmMsgDepth);
tcQueue = QueueFactory::instance()->createMessageQueue(tcMsgDepth);
}
MessageQueueId_t TmFunnelBase::getCommandQueue() const { return tcQueue->getId(); }
TmFunnelBase::~TmFunnelBase() { QueueFactory::instance()->deleteMessageQueue(tmQueue); }
MessageQueueId_t TmFunnelBase::getReportReceptionQueue(uint8_t virtualChannel) const {
return tmQueue->getId();
}
void TmFunnelBase::addDestination(const AcceptsTelemetryIF &downlinkDestination, uint8_t vcid) {
auto queueId = downlinkDestination.getReportReceptionQueue(vcid);
destinations.emplace_back(queueId, vcid);
}