ImgDetections.cpp
Go to the documentation of this file.
2 
3 namespace dai {
4 
5 std::shared_ptr<RawBuffer> ImgDetections::serialize() const {
6  return raw;
7 }
8 
9 ImgDetections::ImgDetections() : Buffer(std::make_shared<RawImgDetections>()), dets(*dynamic_cast<RawImgDetections*>(raw.get())), detections(dets.detections) {}
10 ImgDetections::ImgDetections(std::shared_ptr<RawImgDetections> ptr)
11  : Buffer(std::move(ptr)), dets(*dynamic_cast<RawImgDetections*>(raw.get())), detections(dets.detections) {}
12 
13 // setters
14 ImgDetections& ImgDetections::setTimestamp(std::chrono::time_point<std::chrono::steady_clock, std::chrono::steady_clock::duration> tp) {
15  // Set timestamp from timepoint
16  return static_cast<ImgDetections&>(Buffer::setTimestamp(tp));
17 }
18 ImgDetections& ImgDetections::setTimestampDevice(std::chrono::time_point<std::chrono::steady_clock, std::chrono::steady_clock::duration> tp) {
19  // Set timestamp from timepoint
20  return static_cast<ImgDetections&>(Buffer::setTimestampDevice(tp));
21 }
23  return static_cast<ImgDetections&>(Buffer::setSequenceNum(sequenceNum));
24 }
25 
26 } // namespace dai
DAI_SPAN_NAMESPACE_NAME::get
constexpr auto get(span< E, S > s) -> decltype(s[N])
Definition: span.hpp:491
dai::ImgDetections::ImgDetections
ImgDetections()
Construct ImgDetections message.
Definition: ImgDetections.cpp:9
dai::Buffer::setTimestamp
Buffer & setTimestamp(std::chrono::time_point< std::chrono::steady_clock, std::chrono::steady_clock::duration > timestamp)
Definition: Buffer.cpp:39
ImgDetections.hpp
dai::ImgDetections::setSequenceNum
ImgDetections & setSequenceNum(int64_t sequenceNum)
Definition: ImgDetections.cpp:22
dai::Buffer::setTimestampDevice
Buffer & setTimestampDevice(std::chrono::time_point< std::chrono::steady_clock, std::chrono::steady_clock::duration > timestamp)
Definition: Buffer.cpp:47
dai::ImgDetections::setTimestamp
ImgDetections & setTimestamp(std::chrono::time_point< std::chrono::steady_clock, std::chrono::steady_clock::duration > timestamp)
Definition: ImgDetections.cpp:14
dai::Buffer
Base message - buffer of binary data.
Definition: Buffer.hpp:13
dai::RawImgDetections
RawImgDetections structure.
Definition: RawImgDetections.hpp:22
std
Definition: Node.hpp:366
dai::ImgDetections::serialize
std::shared_ptr< RawBuffer > serialize() const override
Definition: ImgDetections.cpp:5
dai::ADatatype::raw
std::shared_ptr< RawBuffer > raw
Definition: ADatatype.hpp:15
dai::ImgDetections
Definition: ImgDetections.hpp:14
dai
Definition: CameraExposureOffset.hpp:6
dai::Buffer::setSequenceNum
Buffer & setSequenceNum(int64_t sequenceNum)
Definition: Buffer.cpp:55
dai::ImgDetections::setTimestampDevice
ImgDetections & setTimestampDevice(std::chrono::time_point< std::chrono::steady_clock, std::chrono::steady_clock::duration > timestamp)
Definition: ImgDetections.cpp:18


depthai
Author(s): Martin Peterlin
autogenerated on Sat Mar 22 2025 02:58:19