#pragma once #include #include #include "fsfw/cfdp/handler/PduSenderIF.h" struct SentPdu { cfdp::PduType pduType; std::optional fileDirective; std::vector rawPdu; }; class PduSenderMock : public cfdp::PduSenderIF { public: ReturnValue_t sendPdu(cfdp::PduType pduType, std::optional fileDirective, const uint8_t* pdu, size_t pduSize) override { SentPdu sentPdu; sentPdu.pduType = pduType; sentPdu.fileDirective = fileDirective; sentPdu.rawPdu = std::vector(pdu, pdu + pduSize); sentPdus.push_back(sentPdu); return returnvalue::OK; } std::optional getNextSentPacket() { if (sentPdus.empty()) { return std::nullopt; } SentPdu nextPdu = sentPdus.front(); sentPdus.pop_front(); return nextPdu; } std::deque sentPdus; };