|
libxr
1.0
Want to be the best embedded framework
|
同步订阅者类,允许同步方式接收数据。Synchronous subscriber class allowing data reception in a synchronous manner. More...
#include <message.hpp>
Public Member Functions | |
| SyncSubscriber (const char *name, Data &data, Domain *domain=nullptr) | |
| 通过主题名称构造同步订阅者。Constructs a synchronous subscriber by topic name. | |
| SyncSubscriber (Topic topic, Data &data) | |
通过 Topic 句柄构造同步订阅者。Constructs a synchronous subscriber using a Topic handle. | |
| ErrorCode | Wait (uint32_t timeout=UINT32_MAX) |
| 等待接收数据。Waits for data reception. | |
Data Fields | |
| LockFreeList::Node< SyncBlock > * | block_ |
| 订阅者数据块。Subscriber data block. | |
同步订阅者类,允许同步方式接收数据。Synchronous subscriber class allowing data reception in a synchronous manner.
| Data | 订阅的数据类型。Type of data being subscribed to. |
Definition at line 239 of file message.hpp.
|
inline |
通过主题名称构造同步订阅者。Constructs a synchronous subscriber by topic name.
| name | 主题名称。Topic name. |
| data | 存储接收数据的变量。Variable to store received data. |
| domain | 可选的主题域。Optional topic domain. |
Definition at line 252 of file message.hpp.
|
inline |
通过 Topic 句柄构造同步订阅者。Constructs a synchronous subscriber using a Topic handle.
| topic | 订阅的主题。Topic being subscribed to. |
| data | 存储接收数据的变量。Variable to store received data. |
Definition at line 266 of file message.hpp.
|
inline |
等待接收数据。Waits for data reception.
| timeout | 超时时间(默认最大值)。Timeout period (default is maximum). |
Definition at line 288 of file message.hpp.
| LockFreeList::Node<SyncBlock>* LibXR::Topic::SyncSubscriber< Data >::block_ |
订阅者数据块。Subscriber data block.
Definition at line 294 of file message.hpp.