20 lines
700 B
C++
20 lines
700 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 AcceptsTelemetryIF &downlinkDestination, uint8_t vcid) {
|
||
|
auto queueId = downlinkDestination.getReportReceptionQueue(vcid);
|
||
|
destinations.emplace_back(queueId, vcid);
|
||
|
}
|