|
libxr
1.0
Want to be the best embedded framework
|
异步订阅者类,用于订阅异步数据 Asynchronous subscriber class for subscribing to asynchronous data More...
#include <message.hpp>
Public Member Functions | |
| ASyncSubscriber (const char *name, Domain *domain=nullptr) | |
| 构造函数,通过名称和数据创建订阅者 Constructor to create a subscriber with a name and data | |
| ASyncSubscriber (Topic topic) | |
| 构造函数,使用 Topic 进行初始化 Constructor using a Topic for initialization | |
| bool | Available () |
| 检查数据是否可用 Checks if data is available | |
| Data & | GetData () |
| 获取当前数据 Retrieves the current data | |
| void | StartWaiting () |
| 开始等待数据更新 Starts waiting for data update | |
Data Fields | |
| LockFreeList::Node< ASyncBlock > * | block_ |
| 订阅者数据块。Subscriber data block. | |
异步订阅者类,用于订阅异步数据 Asynchronous subscriber class for subscribing to asynchronous data
| Data | 订阅的数据类型 Subscribed data type |
Definition at line 322 of file message.hpp.
|
inline |
构造函数,通过名称和数据创建订阅者 Constructor to create a subscriber with a name and data
| name | 订阅的主题名称 Name of the subscribed topic |
| domain | 可选的域指针 Optional domain pointer (default: nullptr) |
Definition at line 334 of file message.hpp.
|
inline |
构造函数,使用 Topic 进行初始化 Constructor using a Topic for initialization
| topic | 订阅的主题 Subscribed topic |
Definition at line 347 of file message.hpp.
|
inline |
检查数据是否可用 Checks if data is available
Definition at line 372 of file message.hpp.
|
inline |
获取当前数据 Retrieves the current data
Definition at line 384 of file message.hpp.
|
inline |
开始等待数据更新 Starts waiting for data update
Definition at line 394 of file message.hpp.
| LockFreeList::Node<ASyncBlock>* LibXR::Topic::ASyncSubscriber< Data >::block_ |
订阅者数据块。Subscriber data block.
Definition at line 399 of file message.hpp.