2023-03-09 11:46:13 +01:00
|
|
|
#ifndef MISSION_TMTC_PUSLIVEDEMUX_H_
|
|
|
|
#define MISSION_TMTC_PUSLIVEDEMUX_H_
|
|
|
|
|
|
|
|
#include <fsfw/ipc/messageQueueDefinitions.h>
|
|
|
|
#include <fsfw/storagemanager/StorageManagerIF.h>
|
|
|
|
#include <fsfw/tmtcservices/AcceptsTelemetryIF.h>
|
2023-03-09 12:20:13 +01:00
|
|
|
#include <fsfw/tmtcservices/TmTcMessage.h>
|
2023-03-09 11:46:13 +01:00
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
class PusLiveDemux {
|
|
|
|
public:
|
|
|
|
PusLiveDemux(MessageQueueIF& ownerQueue);
|
|
|
|
ReturnValue_t demultiplexPackets(StorageManagerIF& tmStore, store_address_t origStoreId,
|
|
|
|
const uint8_t* tmData, size_t tmSize);
|
|
|
|
|
|
|
|
void addDestination(const char* name, const AcceptsTelemetryIF& downlinkDestination,
|
|
|
|
uint8_t vcid = 0);
|
|
|
|
|
|
|
|
private:
|
|
|
|
struct Destination {
|
|
|
|
Destination(const char* name, MessageQueueId_t queueId, uint8_t virtualChannel)
|
|
|
|
: name(name), queueId(queueId), virtualChannel(virtualChannel) {}
|
|
|
|
|
|
|
|
const char* name;
|
|
|
|
MessageQueueId_t queueId;
|
|
|
|
uint8_t virtualChannel = 0;
|
|
|
|
};
|
|
|
|
|
|
|
|
MessageQueueIF& ownerQueue;
|
|
|
|
TmTcMessage message;
|
|
|
|
std::vector<Destination> destinations;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* MISSION_TMTC_PUSLIVEDEMUX_H_ */
|