fsfw/src/fsfw/cfdp/pdu/EofInfo.h

34 lines
995 B
C
Raw Normal View History

#ifndef FSFW_SRC_FSFW_CFDP_PDU_EOFINFO_H_
#define FSFW_SRC_FSFW_CFDP_PDU_EOFINFO_H_
2023-07-19 13:44:52 +02:00
#include "../Fss.h"
2022-02-02 10:29:30 +01:00
#include "../definitions.h"
#include "fsfw/cfdp/tlv/EntityIdTlv.h"
struct EofInfo {
2022-02-02 10:29:30 +01:00
public:
2022-09-02 14:39:53 +02:00
explicit EofInfo(EntityIdTlv* faultLoc = nullptr);
2023-07-19 13:44:52 +02:00
EofInfo(cfdp::ConditionCode conditionCode, uint32_t checksum, cfdp::Fss fileSize,
2022-02-02 10:29:30 +01:00
EntityIdTlv* faultLoc = nullptr);
2022-02-02 10:29:30 +01:00
size_t getSerializedSize(bool fssLarge = false);
2022-09-02 14:39:53 +02:00
[[nodiscard]] uint32_t getChecksum() const;
2022-09-15 18:41:15 +02:00
[[nodiscard]] cfdp::ConditionCode getConditionCode() const;
2022-09-02 14:39:53 +02:00
[[nodiscard]] EntityIdTlv* getFaultLoc() const;
2023-07-19 13:44:52 +02:00
cfdp::Fss& getFileSize();
2022-02-02 10:29:30 +01:00
void setChecksum(uint32_t checksum);
2022-09-15 18:41:15 +02:00
void setConditionCode(cfdp::ConditionCode conditionCode);
2022-02-02 10:29:30 +01:00
void setFaultLoc(EntityIdTlv* faultLoc);
ReturnValue_t setFileSize(size_t size, bool isLarge);
2022-02-02 10:29:30 +01:00
private:
2022-09-15 18:41:15 +02:00
cfdp::ConditionCode conditionCode;
2022-02-02 10:29:30 +01:00
uint32_t checksum;
2023-07-19 13:44:52 +02:00
cfdp::Fss fileSize;
2022-02-02 10:29:30 +01:00
EntityIdTlv* faultLoc = nullptr;
};
#endif /* FSFW_SRC_FSFW_CFDP_PDU_EOFINFO_H_ */