2022-11-02 10:26:45 +01:00
|
|
|
#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();
|
|
|
|
}
|
|
|
|
|
2023-02-07 17:18:13 +01:00
|
|
|
void TmFunnelBase::addDestination(const char *name, const AcceptsTelemetryIF &downlinkDestination,
|
|
|
|
uint8_t vcid) {
|
2022-11-02 10:26:45 +01:00
|
|
|
auto queueId = downlinkDestination.getReportReceptionQueue(vcid);
|
2023-02-07 17:18:13 +01:00
|
|
|
destinations.emplace_back(name, queueId, vcid);
|
2022-11-02 10:26:45 +01:00
|
|
|
}
|