fsfw/unittests/mocks/cfdp/UserMock.cpp

36 lines
1.4 KiB
C++
Raw Normal View History

#include "UserMock.h"
namespace cfdp {
cfdp::UserMock::UserMock(HasFileSystemIF& vfs) : UserBase(vfs) {}
void UserMock::transactionIndication(const TransactionId& id) {}
void UserMock::eofSentIndication(const TransactionId& id) {}
void UserMock::abandonedIndication(const TransactionId& id, cfdp::ConditionCode code,
2022-08-24 17:31:26 +02:00
uint64_t progress) {}
void UserMock::eofRecvIndication(const TransactionId& id) { eofsRevd.push(id); }
2022-09-06 14:06:22 +02:00
void UserMock::transactionFinishedIndication(const TransactionFinishedParams& finishedParams) {
finishedRecvd.push({finishedParams.id, finishedParams});
}
2022-09-06 13:16:00 +02:00
void UserMock::metadataRecvdIndication(const MetadataRecvdParams& params) {
2022-09-06 14:06:22 +02:00
metadataRecvd.push({params.id, params});
2022-09-06 13:16:00 +02:00
}
void UserMock::fileSegmentRecvdIndication(const FileSegmentRecvdParams& params) {}
void UserMock::reportIndication(const TransactionId& id, StatusReportIF& report) {}
void UserMock::suspendedIndication(const TransactionId& id, ConditionCode code) {}
void UserMock::resumedIndication(const TransactionId& id, size_t progress) {}
2022-08-24 17:31:26 +02:00
void UserMock::faultIndication(const TransactionId& id, cfdp::ConditionCode code, size_t progress) {
}
2022-08-24 17:31:26 +02:00
2022-09-06 13:16:00 +02:00
void UserMock::reset() {
std::queue<TransactionId>().swap(eofsRevd);
2022-09-06 14:06:22 +02:00
std::queue<std::pair<TransactionId, cfdp::MetadataRecvdParams>>().swap(metadataRecvd);
std::queue<std::pair<TransactionId, cfdp::TransactionFinishedParams>>().swap(finishedRecvd);
2022-09-06 13:16:00 +02:00
}
2022-08-24 17:31:26 +02:00
} // namespace cfdp