39 lines
824 B
C++

#ifndef GERMANAIRLINESVA_GACONNECTOR_RECORDING_H
#define GERMANAIRLINESVA_GACONNECTOR_RECORDING_H
#include <cstdint>
#include <cstring>
#include <vector>
#include "pathSegment.h"
namespace germanairlinesva_recording
{
/*
* Path Recording (6 + n * 24)
* HEADER | SEGMENTS
* Header (6)
* CHAR[5] | UINT8
* --------+--------
* VGAR | VERSION
* Path Segments (n)
* PATHSEGMENT[]
*/
class PathRecording
{
private:
std::uint64_t count = 0;
std::vector<std::uint8_t> file{'V', 'G', 'A', 'R', '\0', 1};
public:
void addSegment(const PathSegment &segment);
inline const std::uint8_t *getBinaryData() const { return file.data(); }
inline std::size_t getBinaryLength() const { return file.size(); }
};
} // namespace germanairlinesva_recording
#endif