此页面由 AI 自动翻译。查看英文原版

本页目录

  • 创建 MessageGroup
  • 参考

MessageGroup

MessageGroup 消息类型是一种多功能容器,用于在 DepthAI 管道中将任意 DepthAI 消息的映射组合在一起。它作为 Sync 节点的主要输出,有效地同步来自不同源的消息,并作为 MessageDemux 节点的输入,用于后续的分离和处理。

创建 MessageGroup

MessageGroup 可以由 Sync 节点自动创建,它根据时间戳对来自不同源的消息进行对齐和分组。此外,它也可以在主机应用程序或 Script 节点中手动构建,以创建 DepthAI 消息的自定义分组。

参考

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
function
void serialize(std::vector< std::uint8_t > & metadata, DatatypeEnum & datatype)
inline function
DatatypeEnum getDatatype()
function
DEPTHAI_SERIALIZE(MessageGroup, group, Buffer::ts, Buffer::tsDevice, Buffer::sequenceNum)

需要帮助?

请前往 Discussion Forum 获取技术支持或提出您可能有的任何其他问题。