2022-07-19 18:13:25 +02:00
|
|
|
#ifndef FSFW_TMTCPACKET_PUSIF_H
|
|
|
|
#define FSFW_TMTCPACKET_PUSIF_H
|
|
|
|
|
|
|
|
#include <cstdint>
|
|
|
|
|
2022-07-21 11:34:11 +02:00
|
|
|
#include "fsfw/returnvalues/FwClassIds.h"
|
2022-07-20 11:43:16 +02:00
|
|
|
#include "fsfw/tmtcpacket/ccsds/SpacePacketIF.h"
|
2022-07-19 18:13:25 +02:00
|
|
|
|
|
|
|
class PusIF : public SpacePacketIF {
|
|
|
|
public:
|
2022-07-21 11:34:11 +02:00
|
|
|
static constexpr uint8_t INTERFACE_ID = CLASS_ID::PUS_IF;
|
2022-08-16 01:08:26 +02:00
|
|
|
static constexpr ReturnValue_t INVALID_PUS_VERSION = returnvalue::makeCode(INTERFACE_ID, 0);
|
|
|
|
static constexpr ReturnValue_t INVALID_CRC_16 = returnvalue::makeCode(INTERFACE_ID, 1);
|
2022-07-21 11:34:11 +02:00
|
|
|
|
2022-07-19 18:13:25 +02:00
|
|
|
~PusIF() override = default;
|
|
|
|
/**
|
|
|
|
* This command returns the TC Packet PUS Version Number.
|
|
|
|
* The version number of ECSS PUS 2003 is 1.
|
|
|
|
* It consists of the second to fourth highest bits of the
|
|
|
|
* first byte.
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
[[nodiscard]] virtual uint8_t getPusVersion() const = 0;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* This is a getter for the packet's PUS Service ID, which is the second
|
|
|
|
* byte of the Data Field Header.
|
|
|
|
* @return The packet's PUS Service ID.
|
|
|
|
*/
|
|
|
|
[[nodiscard]] virtual uint8_t getService() const = 0;
|
|
|
|
/**
|
|
|
|
* This is a getter for the packet's PUS Service Subtype, which is the
|
|
|
|
* third byte of the Data Field Header.
|
|
|
|
* @return The packet's PUS Service Subtype.
|
|
|
|
*/
|
|
|
|
[[nodiscard]] virtual uint8_t getSubService() const = 0;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // FSFW_TMTCPACKET_PUSIF_H
|