eive-obsw/mission/tmtc/TmFunnelBase.cpp
Robin Mueller e8120fcdef
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
allow passsing TM dest names
2023-02-07 17:18:13 +01:00

21 lines
758 B
C++

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