39 lines
799 B
C++
39 lines
799 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(PathSegment segment);
|
|
|
|
inline std::uint8_t *getBinaryData() { return file.data(); }
|
|
inline std::size_t getBinaryLength() { return file.size(); }
|
|
};
|
|
|
|
} // namespace germanairlinesva_recording
|
|
|
|
#endif |