Base message - buffer of binary data. More...
#include <Buffer.hpp>

Public Member Functions | |
| Buffer () | |
| Creates Buffer message. More... | |
| Buffer (std::shared_ptr< dai::RawBuffer > ptr) | |
| std::vector< std::uint8_t > & | getData () const |
| Get non-owning reference to internal buffer. More... | |
| int64_t | getSequenceNum () const |
| std::chrono::time_point< std::chrono::steady_clock, std::chrono::steady_clock::duration > | getTimestamp () const |
| std::chrono::time_point< std::chrono::steady_clock, std::chrono::steady_clock::duration > | getTimestampDevice () const |
| void | setData (const std::vector< std::uint8_t > &data) |
| void | setData (std::vector< std::uint8_t > &&data) |
| Buffer & | setSequenceNum (int64_t sequenceNum) |
| Buffer & | setTimestamp (std::chrono::time_point< std::chrono::steady_clock, std::chrono::steady_clock::duration > timestamp) |
| Buffer & | setTimestampDevice (std::chrono::time_point< std::chrono::steady_clock, std::chrono::steady_clock::duration > timestamp) |
| virtual | ~Buffer ()=default |
Public Member Functions inherited from dai::ADatatype | |
| ADatatype (std::shared_ptr< RawBuffer > r) | |
| std::shared_ptr< RawBuffer > | getRaw () const |
| virtual | ~ADatatype ()=default |
Private Member Functions | |
| std::shared_ptr< dai::RawBuffer > | serialize () const override |
Additional Inherited Members | |
Protected Attributes inherited from dai::ADatatype | |
| std::shared_ptr< RawBuffer > | raw |
Base message - buffer of binary data.
Definition at line 13 of file Buffer.hpp.
| dai::Buffer::Buffer | ( | ) |
Creates Buffer message.
Definition at line 9 of file Buffer.cpp.
|
explicit |
Definition at line 10 of file Buffer.cpp.
|
virtualdefault |
| std::vector< std::uint8_t > & dai::Buffer::getData | ( | ) | const |
Get non-owning reference to internal buffer.
Definition at line 13 of file Buffer.cpp.
| int64_t dai::Buffer::getSequenceNum | ( | ) | const |
Retrieves sequence number
Definition at line 34 of file Buffer.cpp.
| std::chrono::time_point< std::chrono::steady_clock, std::chrono::steady_clock::duration > dai::Buffer::getTimestamp | ( | ) | const |
Retrieves timestamp related to dai::Clock::now()
Definition at line 26 of file Buffer.cpp.
| std::chrono::time_point< std::chrono::steady_clock, std::chrono::steady_clock::duration > dai::Buffer::getTimestampDevice | ( | ) | const |
Retrieves timestamp directly captured from device's monotonic clock, not synchronized to host time. Used mostly for debugging
Definition at line 30 of file Buffer.cpp.
|
overrideprivatevirtual |
Implements dai::ADatatype.
Reimplemented in dai::CameraControl, dai::ImgFrame, dai::ImageManipConfig, dai::PointCloudData, dai::EncodedFrame, dai::NNData, dai::MessageGroup, dai::SpatialImgDetections, dai::Tracklets, dai::EdgeDetectorConfig, dai::FeatureTrackerConfig, dai::ImgDetections, dai::IMUData, dai::PointCloudConfig, dai::SpatialLocationCalculatorConfig, dai::SpatialLocationCalculatorData, dai::StereoDepthConfig, dai::SystemInformation, dai::ToFConfig, dai::TrackedFeatures, and dai::ImageAlignConfig.
Definition at line 5 of file Buffer.cpp.
| void dai::Buffer::setData | ( | const std::vector< std::uint8_t > & | data | ) |
| data | Copies data to internal buffer |
Definition at line 17 of file Buffer.cpp.
| void dai::Buffer::setData | ( | std::vector< std::uint8_t > && | data | ) |
| data | Moves data to internal buffer |
Definition at line 21 of file Buffer.cpp.
| Buffer & dai::Buffer::setSequenceNum | ( | int64_t | sequenceNum | ) |
Retrieves sequence number
Definition at line 55 of file Buffer.cpp.
| Buffer & dai::Buffer::setTimestamp | ( | std::chrono::time_point< std::chrono::steady_clock, std::chrono::steady_clock::duration > | timestamp | ) |
Sets timestamp related to dai::Clock::now()
Definition at line 39 of file Buffer.cpp.
| Buffer & dai::Buffer::setTimestampDevice | ( | std::chrono::time_point< std::chrono::steady_clock, std::chrono::steady_clock::duration > | timestamp | ) |
Sets timestamp related to dai::Clock::now()
Definition at line 47 of file Buffer.cpp.