ON THIS PAGE

  • MessageGroup
  • Creating MessageGroup
  • Reference

MessageGroup

The MessageGroup message type is a versatile container used in DepthAI pipelines to group together a map of arbitrary DepthAI messages. It serves as the primary output of the Sync node, effectively synchronizing various input streams, and acts as the input to the MessageDemux node for subsequent disaggregation and processing.

Creating MessageGroup

MessageGroup can be created automatically by the Sync node as it aligns and groups messages from different sources based on their timestamps. Alternatively, it can be manually constructed in a host application or within a Script node to create custom groupings of DepthAI messages.

Reference

class

dai::MessageGroup

#include MessageGroup.hpp
variable
std::map< std::string, std::shared_ptr< ADatatype > > group
function
~MessageGroup()
function
std::shared_ptr< ADatatype > operator[](const std::string & name)
inline function
std::shared_ptr< T > get(const std::string & name)
inline function
std::shared_ptr< ADatatype > get(const std::string & name)
function
void add(const std::string & name, const std::shared_ptr< ADatatype > & value)
function
std::map< std::string, std::shared_ptr< ADatatype > >::iterator begin()
function
std::map< std::string, std::shared_ptr< ADatatype > >::iterator end()
function
bool isSynced(int64_t thresholdNs)
True if all messages in the group are in the interval
Parameters
  • thresholdNs: Maximal interval between messages
function
int64_t getIntervalNs()
Retrieves interval between the first and the last message in the group.
function
int64_t getNumMessages()
function
std::vector< std::string > getMessageNames()
Gets the names of messages in the group
inline function
void serialize(std::vector< std::uint8_t > & metadata, DatatypeEnum & datatype)
function
DEPTHAI_SERIALIZE(MessageGroup, group, Buffer::ts, Buffer::tsDevice, Buffer::sequenceNum)

Need assistance?

Head over to Discussion Forum for technical support or any other questions you might have.