fsfw/src/fsfw/cfdp/handler/SourceHandler.h

38 lines
881 B
C
Raw Normal View History

2022-09-14 19:29:43 +02:00
#ifndef FSFW_CFDP_CFDPSOURCEHANDLER_H
#define FSFW_CFDP_CFDPSOURCEHANDLER_H
2023-06-30 11:59:22 +02:00
#include <cstdint>
#include "fsfw/events/EventReportingProxyIF.h"
#include "fsfw/storagemanager/StorageManagerIF.h"
2023-06-30 11:48:25 +02:00
struct SourceHandlerParams {};
2023-06-30 11:36:19 +02:00
2023-06-30 11:59:22 +02:00
struct FsfwSourceParams {
FsfwSourceParams(EventReportingProxyIF* eventReporter, StorageManagerIF& tcStore)
: tcStore(&tcStore){};
EventReportingProxyIF* eventReporter = nullptr;
StorageManagerIF* tcStore = nullptr;
};
2023-06-30 11:36:19 +02:00
class SourceHandler {
2023-06-30 11:48:25 +02:00
public:
2023-06-30 11:59:22 +02:00
SourceHandler(SourceHandlerParams params, FsfwSourceParams fsfwParams);
2023-06-30 11:48:25 +02:00
private:
enum class TransactionStep : uint8_t {
IDLE = 0,
TRANSACTION_START = 1,
CRC_PROCEDURE = 2,
SENDING_METADATA = 3,
SENDING_FILE_DATA = 4,
SENDING_EOF = 5,
WAIT_FOR_ACK = 6,
WAIT_FOR_FINISH = 7,
NOTICE_OF_COMPLETION = 8
};
2023-06-30 11:36:19 +02:00
};
2022-09-14 19:29:43 +02:00
#endif // FSFW_CFDP_CFDPSOURCEHANDLER_H