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,
75 void connect(
const std::string& btAddress,
77 const std::function<
void(
const SocketAddress&, core::socket::
State)>& onStatus)
const {
78 Super::getConfig().Remote::setBtAddress(btAddress).setChannel(channel);
80 connect(SocketAddress
(btAddress
, channel
), onStatus);
83 void connect(
const std::string& btAddress,
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);
93 void connect(
const std::string& btAddress,
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);
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);
SocketAddress(const std::string &btAddress, uint8_t channel)
void 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
void connect(const std::string &btAddress, uint8_t channel, uint8_t bindChannel, const std::function< void(const SocketAddress &, core::socket::State)> &onStatus) const
void connect(const std::string &btAddress, uint8_t channel, const std::string &bindBtAddress, const std::function< void(const SocketAddress &, core::socket::State)> &onStatus) const
void connect(const std::string &btAddress, uint8_t channel, const std::function< void(const SocketAddress &, core::socket::State)> &onStatus) const
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)