fsfw/unittests/mocks/cfdp/UserMock.h

35 lines
1.3 KiB
C
Raw Normal View History

#ifndef FSFW_TESTS_CFDP_USERMOCK_H
#define FSFW_TESTS_CFDP_USERMOCK_H
2022-09-06 13:16:00 +02:00
#include <queue>
#include "fsfw/cfdp/handler/UserBase.h"
2022-09-06 13:16:00 +02:00
namespace cfdp {
2022-08-09 21:03:56 +02:00
class UserMock : public UserBase {
2022-08-17 17:09:39 +02:00
public:
explicit UserMock(HasFileSystemIF& vfs);
2022-08-09 21:03:56 +02:00
void transactionIndication(const TransactionId& id) override;
void eofSentIndication(const TransactionId& id) override;
void abandonedIndication(const TransactionId& id, ConditionCode code, size_t progress) override;
void eofRecvIndication(const TransactionId& id) override;
void transactionFinishedIndication(const TransactionFinishedParams& params) override;
2022-08-24 12:11:03 +02:00
void metadataRecvdIndication(const MetadataRecvdParams& params) override;
void fileSegmentRecvdIndication(const FileSegmentRecvdParams& params) override;
void reportIndication(const TransactionId& id, StatusReportIF& report) override;
void suspendedIndication(const TransactionId& id, ConditionCode code) override;
void resumedIndication(const TransactionId& id, size_t progress) override;
void faultIndication(const TransactionId& id, ConditionCode code, size_t progress) override;
2022-09-06 13:16:00 +02:00
2022-09-06 14:06:22 +02:00
std::queue<std::pair<TransactionId, MetadataRecvdParams>> metadataRecvd;
std::queue<TransactionId> eofsRevd;
2022-09-06 14:06:22 +02:00
std::queue<std::pair<TransactionId, TransactionFinishedParams>> finishedRecvd;
2022-09-06 13:16:00 +02:00
void reset();
};
2022-08-09 21:03:56 +02:00
} // namespace cfdp
#endif // FSFW_TESTS_CFDP_USERMOCK_H