![]() |
同步阻塞订阅
#include "MsgTopic.hpp"
类 | |
| struct | Config |
| 启动时携带的配置参数 更多... | |
Public 成员函数 | |
| MsgTopicSubscriberSync () | |
| ErrCodeE | Connect (const Config &cfg, int32_t timeoutMs) |
| 连接TopicServer 更多... | |
| ErrCodeE | GetMsg (uint32_t &topic, std::string &data, int32_t timeoutMs) |
| 获取订阅的消息 更多... | |
| void | DisConnect () |
| 断开与TopicServer的链接 更多... | |
| const char * | GetSockName () |
| 获取本地地址 更多... | |
|
inline |
| cfg | [in] 启动参数 |
| timeoutMs | [in] 超时时间 |
| ErrCodeE Emx::MsgTopicSubscriberSync::GetMsg | ( | uint32_t & | topic, |
| std::string & | data, | ||
| int32_t | timeoutMs | ||
| ) |
| topic | [in] 消息的topic |
| data | [in] topic携带的数据 |
| timeoutMs | [in] 超时时间 |
| void Emx::MsgTopicSubscriberSync::DisConnect | ( | ) |
|
inline |