fsfw/src/fsfw/tcdistribution/CfdpPacketChecker.h

34 lines
874 B
C
Raw Normal View History

#ifndef FSFW_TCDISTRIBUTION_TCPACKETCHECKCFDP_H_
#define FSFW_TCDISTRIBUTION_TCPACKETCHECKCFDP_H_
2022-07-19 18:13:25 +02:00
#include "CcsdsPacketCheckIF.h"
#include "fsfw/FSFW.h"
2022-07-19 18:13:25 +02:00
class CfdpPacketStored;
/**
* This class performs a formal packet check for incoming CFDP Packets.
* @ingroup tc_distribution
*/
2022-07-19 18:13:25 +02:00
class CfdpPacketChecker : public CcsdsPacketCheckIF, public HasReturnvaluesIF {
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);
2022-07-27 17:00:43 +02:00
ReturnValue_t checkPacket(const SpacePacketReader& currentPacket, size_t packetLen) override;
2022-07-19 18:13:25 +02:00
[[nodiscard]] uint16_t getApid() const;
};
#endif /* FSFW_TCDISTRIBUTION_TCPACKETCHECKCFDP_H_ */