2022-08-09 19:00:47 +02:00
|
|
|
#ifndef FSFW_TESTS_CFDP_USERMOCK_H
|
|
|
|
#define FSFW_TESTS_CFDP_USERMOCK_H
|
|
|
|
|
2022-09-06 13:16:00 +02:00
|
|
|
#include <queue>
|
|
|
|
|
2022-08-09 19:00:47 +02:00
|
|
|
#include "fsfw/cfdp/handler/UserBase.h"
|
2022-09-06 13:16:00 +02:00
|
|
|
|
2022-08-09 19:00:47 +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:
|
2022-08-09 19:00:47 +02:00
|
|
|
explicit UserMock(HasFileSystemIF& vfs);
|
2022-08-09 21:03:56 +02:00
|
|
|
|
2022-08-24 15:43:58 +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;
|
2022-08-24 15:43:58 +02:00
|
|
|
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
|
|
|
|
2023-08-14 13:33:47 +02:00
|
|
|
std::queue<TransactionId> transactionIndicRecvd;
|
2022-09-06 14:06:22 +02:00
|
|
|
std::queue<std::pair<TransactionId, MetadataRecvdParams>> metadataRecvd;
|
2023-08-14 13:40:25 +02:00
|
|
|
std::queue<TransactionId> eofRecvdRecvd;
|
|
|
|
std::queue<TransactionId> eofSentRecvd;
|
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 19:00:47 +02:00
|
|
|
};
|
|
|
|
|
2022-08-09 21:03:56 +02:00
|
|
|
} // namespace cfdp
|
2022-08-09 19:00:47 +02:00
|
|
|
|
|
|
|
#endif // FSFW_TESTS_CFDP_USERMOCK_H
|