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