本页目录

  • 创建 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::tsSystem, Buffer::sequenceNum)

需要帮助?

请前往 OAKChina 官网 获取技术支持或解答您的任何疑问。