#ifndef MISSION_TMTC_PUSLIVEDEMUX_H_ #define MISSION_TMTC_PUSLIVEDEMUX_H_ #include #include #include #include #include class PusLiveDemux { public: PusLiveDemux(MessageQueueIF& ownerQueue); ReturnValue_t demultiplexPackets(StorageManagerIF& tmStore, store_address_t origStoreId, const uint8_t* tmData, size_t tmSize); uint32_t addDestination(const char* name, const AcceptsTelemetryIF& downlinkDestination, uint8_t vcid = 0); void setDestFull(uint32_t listIndex); void setDestAvailable(uint32_t listIndex); 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; bool isFull = false; uint8_t virtualChannel = 0; }; MessageQueueIF& ownerQueue; TmTcMessage message; std::vector destinations; }; #endif /* MISSION_TMTC_PUSLIVEDEMUX_H_ */