2021-12-03 15:37:49 +01:00
|
|
|
#ifndef FSFW_SRC_FSFW_CFDP_PDU_ACKPDUDESERIALIZER_H_
|
|
|
|
#define FSFW_SRC_FSFW_CFDP_PDU_ACKPDUDESERIALIZER_H_
|
|
|
|
|
|
|
|
#include "AckInfo.h"
|
2022-08-03 16:00:48 +02:00
|
|
|
#include "fsfw/cfdp/pdu/FileDirectiveReader.h"
|
2021-12-03 15:37:49 +01:00
|
|
|
|
2022-09-08 12:07:16 +02:00
|
|
|
class AckPduReader : public FileDirectiveReader {
|
2022-02-02 10:29:30 +01:00
|
|
|
public:
|
2022-09-08 12:07:16 +02:00
|
|
|
AckPduReader(const uint8_t* pduBuf, size_t maxSize, AckInfo& info);
|
2021-12-03 15:37:49 +01:00
|
|
|
|
2022-02-02 10:29:30 +01:00
|
|
|
/**
|
|
|
|
*
|
|
|
|
* @return
|
|
|
|
* - cfdp::INVALID_DIRECTIVE_FIELDS: Invalid fields
|
|
|
|
*/
|
2022-09-08 12:07:16 +02:00
|
|
|
ReturnValue_t parseData() override;
|
|
|
|
|
|
|
|
static bool checkAckedDirectiveField(uint8_t firstPduDataByte,
|
2022-09-15 18:41:15 +02:00
|
|
|
cfdp::FileDirective& ackedDirective);
|
2021-12-03 15:37:49 +01:00
|
|
|
|
2022-02-02 10:29:30 +01:00
|
|
|
private:
|
|
|
|
bool checkAndSetCodes(uint8_t rawAckedByte, uint8_t rawAckedConditionCode);
|
|
|
|
AckInfo& info;
|
2021-12-03 15:37:49 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* FSFW_SRC_FSFW_CFDP_PDU_ACKPDUDESERIALIZER_H_ */
|