30 inline static constexpr uint16_t APP_DATA_SIZE = 256;
33 inline static constexpr uint16_t PACKET_SIZE = 6 + 3 + 256 + 2;
35 enum class SequenceFlags : uint8_t {
43 enum class Bool8Enum : uint8_t {
50 const uint8_t versionNumber,
51 const Bool8Enum dataFieldHeader,
52 const uint8_t appIdSource,
53 const uint8_t appIdDestination,
54 const SequenceFlags sequenceControlFlags,
55 const uint16_t sequenceControlCount,
56 const uint16_t length,
57 const Bool8Enum ccsds,
58 const uint8_t pusVersion,
60 const uint8_t serviceType,
61 const uint8_t serviceSubtype,
62 const std::array<std::byte, APP_DATA_SIZE>& appData,
63 const std::array<std::byte, 2> packetErrorControl
67 uint8_t getVersionNumber()
const;
68 void setVersionNumber(
const uint8_t versionNumber);
70 Bool8Enum getDataFieldHeader()
const;
71 void setDataFieldHeader(
const Bool8Enum newValue);
73 uint8_t getAppIdSource()
const;
74 void setAppIdSource(
const uint8_t newAddress);
76 uint8_t getAppIdDestination()
const;
77 void setAppIdDestination(
const uint8_t newAddress);
79 SequenceFlags getSequenceControlFlags()
const;
80 void setSequenceControlFlags(
const SequenceFlags newFlags);
82 uint16_t getSequenceControlCount()
const;
83 void setSequenceControlCount(
const uint16_t newCount);
85 uint16_t getLength()
const;
86 void setLength(
const uint16_t amountOfBytes);
88 Bool8Enum getCCSDS()
const;
89 void setCCSDS(
const Bool8Enum ccsds);
91 uint8_t getPUSVersion()
const;
92 void setPUSVersion(
const uint8_t pusVersion);
94 Bool8Enum getAck()
const;
95 void setAck(
const Bool8Enum newValue);
97 uint8_t getServiceType()
const;
98 void setServiceType(
const uint8_t typeId);
100 uint8_t getServiceSubtype()
const;
101 void setServiceSubtype(
const uint8_t subtypeId);
103 std::array<std::byte, 2> getPacketErrorControl()
const;
104 void setPacketErrorControl(
const std::array<std::byte, 2> crc);
108 std::array<std::byte, APP_DATA_SIZE> getAppData();
109 void setAppData(
const std::array<std::byte, APP_DATA_SIZE>& ptrNewAppData);
113 void pushData(
const std::byte bytesToPush);
114 void pushData(
const uint16_t bytesToPush);
115 void pushData(
const std::array<std::byte, 2> bytesToPush);
116 void pushData(
const std::vector<std::byte>& bytesToPush);
120 uint8_t versionNumber_;
121 Bool8Enum dataFieldHeader_;
122 uint8_t appIdSource_;
123 uint8_t appIdDestination_;
124 SequenceFlags sequenceControlFlags_;
125 uint16_t sequenceControlCount_;
132 uint8_t serviceType_;
133 uint8_t serviceSubtype_;
136 std::array<std::byte, APP_DATA_SIZE> appData_;
137 uint8_t appDataIndex_;
140 std::array<std::byte, 2> packetErrorControl_;