DDS_Bridge
一个基于Fast DDS的DDS桥接库
载入中...
搜索中...
未找到
zclcpp::Subscription< MsgPubSubType > 模板类 参考

Represents a DDS subscription. 更多...

#include <subscriber.hpp>

类 zclcpp::Subscription< MsgPubSubType > 继承关系图:
zclcpp::Subscription< MsgPubSubType > 的协作图:

Public 类型

using MsgT = typename MsgPubSubType::type
 Message type for Subscription.
using SharedPtr = std::shared_ptr<Subscription<MsgPubSubType>>
 Shared pointer type for Subscription.
using Callback = std::function<void(const typename MsgPubSubType::type&)>
 Callback type for message reception.

Public 成员函数

 Subscription (std::shared_ptr< Node > node, const std::string &topic_name, int qos_depth, Callback cb)
 Construct a new Subscription object, it is recommended to use the create_subscription() method of the Node class instead.
void on_data_available (eprosima::fastdds::dds::DataReader *reader) override
 internal method to handle data availability, user should NOT call this directly.

详细描述

template<typename MsgPubSubType>
class zclcpp::Subscription< MsgPubSubType >

Represents a DDS subscription.

模板参数
MsgPubSubTypeThe message type used for subscribing.

构造及析构函数说明

◆ Subscription()

template<typename MsgPubSubType>
zclcpp::Subscription< MsgPubSubType >::Subscription ( std::shared_ptr< Node > node,
const std::string & topic_name,
int qos_depth,
Callback cb )
inline

Construct a new Subscription object, it is recommended to use the create_subscription() method of the Node class instead.

参数
nodenode pointer
topic_nameThe name of the topic
qos_depthThe QoS depth
cbThe callback function

成员函数说明

◆ on_data_available()

template<typename MsgPubSubType>
void zclcpp::Subscription< MsgPubSubType >::on_data_available ( eprosima::fastdds::dds::DataReader * reader)
inlineoverride

internal method to handle data availability, user should NOT call this directly.

参数
readeruser should NOT call this directly.

该类的文档由以下文件生成:
  • C:/Users/ZhouZishun/OneDrive/documents/PhDDoc/PoweredByZZS/DDS_Bridge/src/node.hpp
  • C:/Users/ZhouZishun/OneDrive/documents/PhDDoc/PoweredByZZS/DDS_Bridge/src/subscriber.hpp