RMVL  2.4.0-dev
Robotic Manipulation and Vision Library
载入中...
搜索中...
未找到
rm::lpss::async::Publisher< MsgType > 模板类 参考final

异步发布者代理 更多...

#include <rmvl/lpss/node.hpp>

rm::lpss::async::Publisher< MsgType > 的协作图:

Public 类型

using ptr = std::shared_ptr<Publisher<MsgType>>

Public 成员函数

bool invalid () const noexcept
 判断发布者是否无效
void publish (const MsgType &msg)
 发布消息到指定话题

详细描述

template<typename MsgType>
class rm::lpss::async::Publisher< MsgType >

异步发布者代理

模板参数
MsgType消息类型
  • 用户需使用 lpss::async::NodecreatePublisher 方法创建发布者
  • 发布者可使用 publish 方法发布消息到指定话题
  • 在创建发布者后,自动注册到本地通信端点,并向所有通过 NDP 发现的节点发送 EDP 消息

成员类型定义说明

◆ ptr

template<typename MsgType>
using rm::lpss::async::Publisher< MsgType >::ptr = std::shared_ptr<Publisher<MsgType>>

成员函数说明

◆ invalid()

template<typename MsgType>
bool rm::lpss::async::Publisher< MsgType >::invalid ( ) const
inlinenoexcept

判断发布者是否无效

◆ publish()

template<typename MsgType>
void rm::lpss::async::Publisher< MsgType >::publish ( const MsgType & msg)

发布消息到指定话题

参数
[in]msg消息内容
函数调用图: