2021-12-03 15:37:49 +01:00
|
|
|
#ifndef FSFW_TCDISTRIBUTION_TCPACKETCHECKCFDP_H_
|
|
|
|
#define FSFW_TCDISTRIBUTION_TCPACKETCHECKCFDP_H_
|
|
|
|
|
2022-07-19 18:13:25 +02:00
|
|
|
#include "CcsdsPacketCheckIF.h"
|
2021-12-03 15:37:49 +01:00
|
|
|
#include "fsfw/FSFW.h"
|
|
|
|
|
2022-07-19 18:13:25 +02:00
|
|
|
class CfdpPacketStored;
|
2021-12-03 15:37:49 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* This class performs a formal packet check for incoming CFDP Packets.
|
|
|
|
* @ingroup tc_distribution
|
|
|
|
*/
|
2022-08-16 01:08:26 +02:00
|
|
|
class CfdpPacketChecker : public CcsdsPacketCheckIF {
|
2022-02-02 10:29:30 +01:00
|
|
|
protected:
|
|
|
|
/**
|
|
|
|
* The packet id each correct packet should have.
|
|
|
|
* It is composed of the APID and some static fields.
|
|
|
|
*/
|
|
|
|
uint16_t apid;
|
|
|
|
|
|
|
|
public:
|
|
|
|
/**
|
|
|
|
* The constructor only sets the APID attribute.
|
|
|
|
* @param set_apid The APID to set.
|
|
|
|
*/
|
2022-07-19 18:13:25 +02:00
|
|
|
explicit CfdpPacketChecker(uint16_t setApid);
|
2021-12-03 15:37:49 +01:00
|
|
|
|
2022-07-27 17:00:43 +02:00
|
|
|
ReturnValue_t checkPacket(const SpacePacketReader& currentPacket, size_t packetLen) override;
|
2021-12-03 15:37:49 +01:00
|
|
|
|
2022-07-19 18:13:25 +02:00
|
|
|
[[nodiscard]] uint16_t getApid() const;
|
2021-12-03 15:37:49 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* FSFW_TCDISTRIBUTION_TCPACKETCHECKCFDP_H_ */
|