fsfw/src/fsfw/cfdp/pdu/NakPduCreator.h

39 lines
1.0 KiB
C
Raw Normal View History

2022-09-14 19:48:11 +02:00
#ifndef FSFW_CFDP_PDU_NAKPDUSERIALIZER_H_
#define FSFW_CFDP_PDU_NAKPDUSERIALIZER_H_
#include <vector>
2022-02-02 10:29:30 +01:00
#include "NakInfo.h"
#include "fsfw/cfdp/FileSize.h"
#include "fsfw/cfdp/definitions.h"
2022-08-03 16:00:48 +02:00
#include "fsfw/cfdp/pdu/FileDirectiveCreator.h"
2022-09-14 19:48:11 +02:00
class NakPduCreator : public FileDirectiveCreator {
2022-02-02 10:29:30 +01:00
public:
/**
*
* @param PduConf
* @param startOfScope
* @param endOfScope
* @param [in] segmentRequests Pointer to the start of a list of segment requests
* @param segmentRequestLen Length of the segment request list to be serialized
*/
2022-09-14 19:48:11 +02:00
NakPduCreator(PduConfig& PduConf, NakInfo& nakInfo);
2022-02-02 10:29:30 +01:00
2022-09-14 19:48:11 +02:00
[[nodiscard]] size_t getSerializedSize() const override;
2022-02-02 10:29:30 +01:00
ReturnValue_t serialize(uint8_t** buffer, size_t* size, size_t maxSize,
Endianness streamEndianness) const override;
/**
* If you change the info struct, you might need to update the directive field length
* manually
*/
void updateDirectiveFieldLen();
private:
NakInfo& nakInfo;
};
2022-09-14 19:48:11 +02:00
#endif /* FSFW_CFDP_PDU_NAKPDUSERIALIZER_H_ */