ifw-rtmstools 3.0.0
Loading...
Searching...
No Matches
sampleExtInfo.hpp
Go to the documentation of this file.
1
8#ifndef RTMSTOOLS_SAMPLE_EXT_INFO_LLNETIO_HPP_
9#define RTMSTOOLS_SAMPLE_EXT_INFO_LLNETIO_HPP_
10
11#include <fmt/format.h>
12
13#include <boost/endian/arithmetic.hpp>
14#include <vector>
15
16
17// Note, it is desirable to have the following parameters in the
18// Header Packwet Extended Info:
19// timestamp (double), offset_x (int), offset_y (int), width (int), height (int), datatype (int)
20// However, for the moment the firmware of Freda only supports the "timestamp".
21
23
24 constexpr auto SIZE_SAMPLE_EXT_INFO = sizeof(int32_t);
25
26
28
29 public:
30
32
33 SampleExtInfo(const double timestamp);
34
35 SampleExtInfo(const std::vector<uint8_t> sample_ext_info);
36
38
39 SampleExtInfo& SetTimestamp(const double timestamp);
40
41 double GetTimestamp() const;
42
43 void Pack(std::vector<uint8_t>& sample_ext_info_packed) const;
44 void Unpack(const std::vector<uint8_t>& sample_ext_info_packed);
45
46 // TODO: Use boost endian type.
47 private:
48 double m_timestamp;
49 };
50
51}
52
53#endif // RTMSTOOLS_SAMPLE_EXT_INFO_LLNETIO_HPP_
Definition sampleExtInfo.hpp:27
SampleExtInfo()
Definition sampleExtInfo.cpp:12
~SampleExtInfo()
Definition sampleExtInfo.cpp:24
void Pack(std::vector< uint8_t > &sample_ext_info_packed) const
Definition sampleExtInfo.cpp:35
SampleExtInfo & SetTimestamp(const double timestamp)
Definition sampleExtInfo.cpp:26
void Unpack(const std::vector< uint8_t > &sample_ext_info_packed)
Definition sampleExtInfo.cpp:44
double GetTimestamp() const
Definition sampleExtInfo.cpp:31
Logger source file.
Definition common.cpp:16
constexpr auto SIZE_SAMPLE_EXT_INFO
Definition sampleExtInfo.hpp:24