#include <MessageGroup.hpp>

Public Member Functions | |
| void | add (const std::string &name, const std::shared_ptr< ADatatype > &value) |
| template<typename T > | |
| void | add (const std::string &name, const T &value) |
| std::unordered_map< std::string, std::shared_ptr< ADatatype > >::iterator | begin () |
| std::unordered_map< std::string, std::shared_ptr< ADatatype > >::iterator | end () |
| template<typename T > | |
| std::shared_ptr< T > | get (const std::string &name) |
| int64_t | getIntervalNs () const |
| std::vector< std::string > | getMessageNames () const |
| int64_t | getNumMessages () const |
| bool | isSynced (int64_t thresholdNs) const |
| MessageGroup () | |
| Construct MessageGroup message. More... | |
| MessageGroup (std::shared_ptr< RawMessageGroup > ptr) | |
| std::shared_ptr< ADatatype > | operator[] (const std::string &name) |
| Group. More... | |
| MessageGroup & | setSequenceNum (int64_t sequenceNum) |
| MessageGroup & | setTimestamp (std::chrono::time_point< std::chrono::steady_clock, std::chrono::steady_clock::duration > timestamp) |
| MessageGroup & | setTimestampDevice (std::chrono::time_point< std::chrono::steady_clock, std::chrono::steady_clock::duration > timestamp) |
| virtual | ~MessageGroup ()=default |
Public Member Functions inherited from dai::Buffer | |
| 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< RawBuffer > | serialize () const override |
Private Attributes | |
| std::unordered_map< std::string, std::shared_ptr< ADatatype > > | group |
| RawMessageGroup & | rawGrp |
Additional Inherited Members | |
Protected Attributes inherited from dai::ADatatype | |
| std::shared_ptr< RawBuffer > | raw |
MessageGroup message. Carries multiple messages in one.
Definition at line 16 of file MessageGroup.hpp.
| dai::MessageGroup::MessageGroup | ( | ) |
Construct MessageGroup message.
Definition at line 15 of file MessageGroup.cpp.
|
explicit |
Definition at line 16 of file MessageGroup.cpp.
|
virtualdefault |
| void dai::MessageGroup::add | ( | const std::string & | name, |
| const std::shared_ptr< ADatatype > & | value | ||
| ) |
Definition at line 21 of file MessageGroup.cpp.
|
inline |
Definition at line 35 of file MessageGroup.hpp.
| std::unordered_map< std::string, std::shared_ptr< ADatatype > >::iterator dai::MessageGroup::begin | ( | ) |
Definition at line 26 of file MessageGroup.cpp.
| std::unordered_map< std::string, std::shared_ptr< ADatatype > >::iterator dai::MessageGroup::end | ( | ) |
Definition at line 29 of file MessageGroup.cpp.
|
inline |
Definition at line 30 of file MessageGroup.hpp.
| int64_t dai::MessageGroup::getIntervalNs | ( | ) | const |
Retrieves interval between the first and the last message in the group.
Definition at line 33 of file MessageGroup.cpp.
| std::vector< std::string > dai::MessageGroup::getMessageNames | ( | ) | const |
Gets the names of messages in the group
Definition at line 51 of file MessageGroup.cpp.
| int64_t dai::MessageGroup::getNumMessages | ( | ) | const |
Definition at line 47 of file MessageGroup.cpp.
| bool dai::MessageGroup::isSynced | ( | int64_t | thresholdNs | ) | const |
True if all messages in the group are in the interval
| thresholdNs | Maximal interval between messages |
Definition at line 60 of file MessageGroup.cpp.
| std::shared_ptr< ADatatype > dai::MessageGroup::operator[] | ( | const std::string & | name | ) |
Group.
Definition at line 18 of file MessageGroup.cpp.
|
overrideprivatevirtual |
Reimplemented from dai::Buffer.
Definition at line 11 of file MessageGroup.cpp.
| MessageGroup & dai::MessageGroup::setSequenceNum | ( | int64_t | sequenceNum | ) |
Retrieves image sequence number
Definition at line 73 of file MessageGroup.cpp.
| MessageGroup & dai::MessageGroup::setTimestamp | ( | std::chrono::time_point< std::chrono::steady_clock, std::chrono::steady_clock::duration > | timestamp | ) |
Sets image timestamp related to dai::Clock::now()
Definition at line 65 of file MessageGroup.cpp.
| MessageGroup & dai::MessageGroup::setTimestampDevice | ( | std::chrono::time_point< std::chrono::steady_clock, std::chrono::steady_clock::duration > | timestamp | ) |
Sets image timestamp related to dai::Clock::now()
Definition at line 69 of file MessageGroup.cpp.
|
private |
Definition at line 19 of file MessageGroup.hpp.
|
private |
Definition at line 18 of file MessageGroup.hpp.