fsfw/src/fsfw/tcdistribution/CcsdsPacketCheckIF.h

33 lines
918 B
C
Raw Normal View History

#ifndef FSFW_TCDISTRIBUTION_TCPACKETCHECKIF_H_
#define FSFW_TCDISTRIBUTION_TCPACKETCHECKIF_H_
2022-07-19 18:13:25 +02:00
#include <cstddef>
2022-08-22 16:23:36 +02:00
#include "fsfw/returnvalues/returnvalue.h"
2022-07-18 10:42:56 +02:00
class SpacePacketReader;
/**
* This interface is used by PacketCheckers for PUS packets and CFDP packets .
* @ingroup tc_distribution
*/
2022-07-19 18:13:25 +02:00
class CcsdsPacketCheckIF {
2022-02-02 10:29:30 +01:00
public:
/**
* The empty virtual destructor.
*/
2022-07-19 18:13:25 +02:00
virtual ~CcsdsPacketCheckIF() = default;
2022-02-02 10:29:30 +01:00
/**
* This is the actual method to formally check a certain Packet.
* The packet's Application Data can not be checked here.
* @param current_packet The packet to check
2022-08-16 12:12:21 +02:00
* @return - @c returnvalue::OK on success.
* - @c INCORRECT_CHECKSUM if checksum is invalid.
2022-07-19 18:13:25 +02:00
* - @c ILLEGAL_APID if APID does not match.
2022-02-02 10:29:30 +01:00
*/
2022-07-27 17:00:43 +02:00
virtual ReturnValue_t checkPacket(const SpacePacketReader& currentPacket, size_t packetLen) = 0;
};
#endif /* FSFW_TCDISTRIBUTION_TCPACKETCHECKIF_H_ */