fsfw/src/fsfw/pus/servicepackets/Service9Packets.h

29 lines
827 B
C
Raw Normal View History

2020-09-16 19:11:50 +02:00
#ifndef FSFW_PUS_SERVICEPACKETS_SERVICE9PACKETS_H_
#define FSFW_PUS_SERVICEPACKETS_SERVICE9PACKETS_H_
2022-07-20 22:21:15 +02:00
#include "fsfw/serialize/SerialLinkedListAdapter.h"
2020-09-16 19:11:50 +02:00
/**
* @brief Subservice 128
* @details
* It only contains the time encoded as ASCII, CRC, CUC or CDS
* @ingroup spacepackets
*/
2022-02-02 10:29:30 +01:00
class TimePacket : SerialLinkedListAdapter<SerializeIF> { //!< [EXPORT] : [SUBSERVICE] 128
public:
2022-07-20 22:21:15 +02:00
TimePacket(const TimePacket& command) = delete;
2022-02-02 10:29:30 +01:00
TimePacket(const uint8_t* timeBuffer_, uint32_t timeSize_) {
timeBuffer = timeBuffer_;
timeSize = timeSize_;
}
const uint8_t* getTime() { return timeBuffer; }
2020-09-16 19:11:50 +02:00
2022-07-20 22:21:15 +02:00
[[nodiscard]] uint32_t getTimeSize() const { return timeSize; }
2020-09-16 19:11:50 +02:00
2022-02-02 10:29:30 +01:00
private:
const uint8_t* timeBuffer;
uint32_t timeSize; //!< [EXPORT] : [IGNORE]
2020-09-16 19:11:50 +02:00
};
#endif /* FSFW_PUS_SERVICEPACKETS_SERVICE9PACKETS_H_ */