CARLA
 
载入中...
搜索中...
未找到
Public 类型 | Public 成员函数 | Private 属性 | 所有成员列表
carla::streaming::low_level::Client< T > 模板类 参考

A client able to subscribe to multiple streams. 更多...

#include <Client.h>

+ 类 carla::streaming::low_level::Client< T > 继承关系图:
+ carla::streaming::low_level::Client< T > 的协作图:

Public 类型

using protocol_type = typename underlying_client::protocol_type
 
using token_type = carla::streaming::detail::token_type
 
using underlying_client = T
 

Public 成员函数

 Client ()
 
 Client (boost::asio::ip::address fallback_address)
 
 Client (const std::string &fallback_address)
 
template<typename Functor >
void Subscribe (boost::asio::io_context &io_context, token_type token, Functor &&callback)
 
void UnSubscribe (token_type token)
 
 ~Client ()
 

Private 属性

std::unordered_map< detail::stream_id_type, std::shared_ptr< underlying_client > > _clients
 
boost::asio::ip::address _fallback_address
 

详细描述

template<typename T>
class carla::streaming::low_level::Client< T >

A client able to subscribe to multiple streams.

Accepts an external io_context.

警告
The client should not be destroyed before the io_context is stopped.

在文件 streaming/low_level/Client.h27 行定义.

成员类型定义说明

◆ protocol_type

template<typename T >
using carla::streaming::low_level::Client< T >::protocol_type = typename underlying_client::protocol_type

在文件 streaming/low_level/Client.h31 行定义.

◆ token_type

template<typename T >
using carla::streaming::low_level::Client< T >::token_type = carla::streaming::detail::token_type

在文件 streaming/low_level/Client.h32 行定义.

◆ underlying_client

template<typename T >
using carla::streaming::low_level::Client< T >::underlying_client = T

在文件 streaming/low_level/Client.h30 行定义.

构造及析构函数说明

◆ Client() [1/3]

template<typename T >
carla::streaming::low_level::Client< T >::Client ( boost::asio::ip::address fallback_address)
inlineexplicit

在文件 streaming/low_level/Client.h34 行定义.

◆ Client() [2/3]

template<typename T >
carla::streaming::low_level::Client< T >::Client ( const std::string & fallback_address)
inlineexplicit

在文件 streaming/low_level/Client.h37 行定义.

◆ Client() [3/3]

template<typename T >
carla::streaming::low_level::Client< T >::Client ( )
inlineexplicit

在文件 streaming/low_level/Client.h40 行定义.

◆ ~Client()

template<typename T >
carla::streaming::low_level::Client< T >::~Client ( )
inline

成员函数说明

◆ Subscribe()

template<typename T >
template<typename Functor >
void carla::streaming::low_level::Client< T >::Subscribe ( boost::asio::io_context & io_context,
token_type token,
Functor && callback )
inline
警告
cannot subscribe twice to the same stream (even if it's a MultiStream).

在文件 streaming/low_level/Client.h52 行定义.

引用了 carla::streaming::low_level::Client< T >::_clients, carla::streaming::low_level::Client< T >::_fallback_address, DEBUG_ASSERT_EQ, carla::streaming::detail::token_type::get_stream_id(), carla::streaming::detail::token_type::has_address() , 以及 carla::streaming::detail::token_type::set_address().

被这些函数引用 carla::streaming::Client::Subscribe(), TEST() , 以及 TEST().

+ 函数调用图:
+ 这是这个函数的调用关系图:

◆ UnSubscribe()

template<typename T >
void carla::streaming::low_level::Client< T >::UnSubscribe ( token_type token)
inline

在文件 streaming/low_level/Client.h68 行定义.

引用了 carla::streaming::low_level::Client< T >::_clients, carla::streaming::detail::token_type::get_stream_id() , 以及 carla::log_debug().

被这些函数引用 TEST() , 以及 carla::streaming::Client::UnSubscribe().

+ 函数调用图:
+ 这是这个函数的调用关系图:

类成员变量说明

◆ _clients

template<typename T >
std::unordered_map< detail::stream_id_type, std::shared_ptr<underlying_client> > carla::streaming::low_level::Client< T >::_clients
private

◆ _fallback_address

template<typename T >
boost::asio::ip::address carla::streaming::low_level::Client< T >::_fallback_address
private

该类的文档由以下文件生成: