2021-12-03 15:37:49 +01:00
|
|
|
#ifndef FSFW_TCDISTRIBUTION_TCPACKETCHECKIF_H_
|
|
|
|
#define FSFW_TCDISTRIBUTION_TCPACKETCHECKIF_H_
|
|
|
|
|
2022-08-16 12:48:22 +02:00
|
|
|
#include "../returnvalues/returnvalue.h"
|
2021-12-03 15:37:49 +01:00
|
|
|
|
|
|
|
class SpacePacketBase;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* This interface is used by PacketCheckers for PUS packets and CFDP packets .
|
|
|
|
* @ingroup tc_distribution
|
|
|
|
*/
|
|
|
|
class TcPacketCheckIF {
|
2022-02-02 10:29:30 +01:00
|
|
|
public:
|
|
|
|
/**
|
|
|
|
* The empty virtual destructor.
|
|
|
|
*/
|
|
|
|
virtual ~TcPacketCheckIF() {}
|
2021-12-03 15:37:49 +01:00
|
|
|
|
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.
|
2022-02-02 10:29:30 +01:00
|
|
|
* - @c INCORRECT_CHECKSUM if checksum is invalid.
|
|
|
|
* - @c ILLEGAL_APID if APID does not match.
|
|
|
|
*/
|
|
|
|
virtual ReturnValue_t checkPacket(SpacePacketBase* currentPacket) = 0;
|
2021-12-03 15:37:49 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* FSFW_TCDISTRIBUTION_TCPACKETCHECKIF_H_ */
|