6 #ifndef IFM3D_FG_FRAME_H
7 #define IFM3D_FG_FRAME_H
11 #include <ifm3d/device/device.h>
12 #include <ifm3d/fg/buffer.h>
13 #include <ifm3d/fg/buffer_id.h>
14 #include <ifm3d/fg/module_frame_grabber.h>
20 using TimePointT = std::chrono::time_point<std::chrono::system_clock,
21 std::chrono::nanoseconds>;
23 using BufferList = std::vector<Buffer>;
24 using BufferDataListMap = std::map<ifm3d::buffer_id, BufferList>;
33 using Ptr = std::shared_ptr<Frame>;
35 Frame(
const BufferDataListMap& images,
36 const std::vector<TimePointT>& timestamps,
37 uint64_t frame_count);
51 std::vector<TimePointT> TimeStamps();
71 std::optional<size_t> index = std::nullopt);
81 uint32_t FrameCount();
89 std::vector<buffer_id> GetBuffers();
92 decltype(std::declval<std::map<buffer_id, BufferList>>().begin())
94 [[nodiscard]] decltype(std::declval<
95 const std::map<buffer_id, BufferList>>()
97 begin()
const noexcept;
98 decltype(std::declval<std::map<buffer_id, BufferList>>().end())
100 [[nodiscard]] decltype(std::declval<
101 const std::map<buffer_id, BufferList>>()
103 end()
const noexcept;
108 std::unique_ptr<Impl> _impl;
113 #endif // IFM3D_FG_FRAME_H