2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
42#ifndef NET_RC_STREAM_SOCKETCLIENT_H
43#define NET_RC_STREAM_SOCKETCLIENT_H
45#include "core/socket/stream/SocketClient.h"
46#include "net/rc/phy/stream/PhysicalSocketClient.h"
48#ifndef DOXYGEN_SHOULD_SKIP_THIS
56namespace net::rc::stream {
58 template <
template <
typename PhysicalSocketClient,
typename ConfigSocketClientT>
typename SocketConnectorT,
59 typename ConfigSocketClientT,
60 typename SocketContextFactoryT,
64 SocketContextFactoryT,
77 const std::function<
void(
const SocketAddress&, core::socket::
State)>& onStatus)
const {
78 Super::getConfig().Remote::setBtAddress(btAddress).setChannel(channel);
80 return connect(SocketAddress
(btAddress
, channel
), onStatus);
85 const std::string& bindBtAddress,
86 const std::function<
void(
const SocketAddress&, core::socket::
State)>& onStatus)
const {
87 Super::getConfig().Remote::setBtAddress(btAddress).setChannel(channel);
88 Super::getConfig().Local::setBtAddress(bindBtAddress);
90 return connect(onStatus);
96 const std::function<
void(
const SocketAddress&, core::socket::
State)>& onStatus)
const {
97 Super::getConfig().Remote::setBtAddress(btAddress).setChannel(channel);
98 Super::getConfig().Local::setChannel(bindChannel);
100 return connect(onStatus);
105 const std::string& bindBtAddress,
107 const std::function<
void(
const SocketAddress&, core::socket::
State)>& onStatus)
const {
108 Super::getConfig().Remote::setBtAddress(btAddress).setChannel(channel);
109 Super::getConfig().Local::setBtAddress(bindBtAddress).setChannel(bindChannel);
111 return connect(onStatus);
SocketAddress(const std::string &btAddress, uint8_t channel)
const Super & connect(const std::string &btAddress, uint8_t channel, const std::function< void(const SocketAddress &, core::socket::State)> &onStatus) const
const Super & connect(const std::string &btAddress, uint8_t channel, const std::string &bindBtAddress, uint8_t bindChannel, const std::function< void(const SocketAddress &, core::socket::State)> &onStatus) const
core::socket::stream:: SocketClient< SocketConnectorT< net::rc::phy::stream::PhysicalSocketClient, ConfigSocketClientT >, SocketContextFactoryT, Args... > Super
const Super & connect(const std::string &btAddress, uint8_t channel, uint8_t bindChannel, const std::function< void(const SocketAddress &, core::socket::State)> &onStatus) const
const Super & connect(const std::string &btAddress, uint8_t channel, const std::string &bindBtAddress, const std::function< void(const SocketAddress &, core::socket::State)> &onStatus) const
net::rc::stream::SocketClient< core::socket::stream::legacy::SocketConnector, net::rc::stream::legacy::config::ConfigSocketClient, SocketContextFactoryT, Args... > SocketClient
SocketClient< SocketContextFactory, SocketContextFactoryArgs... > Client(const std::string &instanceName, const std::function< void(typename SocketClient< SocketContextFactory, SocketContextFactoryArgs... >::Config &)> &configurator, SocketContextFactoryArgs &&... socketContextFactoryArgs)
SocketClient< SocketContextFactory, SocketContextFactoryArgs... > Client(const std::string &instanceName, SocketContextFactoryArgs &&... socketContextFactoryArgs)