2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
20#ifndef NET_RC_SOCKETADDRESS_H
21#define NET_RC_SOCKETADDRESS_H
23#include "net/SocketAddress.h"
27#ifndef DOXYGEN_SHOULD_SKIP_THIS
29#include <bluetooth/bluetooth.h>
30#include <bluetooth/rfcomm.h>
38 class SocketAddress
final :
public net::SocketAddress<sockaddr_rc> {
44 explicit SocketAddress(
const std::string& btAddress);
46 SocketAddress(
const std::string& btAddress, uint8_t channel);
51 SocketAddress& setBtAddress(
const std::string& btAddress);
uint8_t getChannel() const
SocketAddress & setChannel(uint8_t channel)
std::string toString(bool expanded=true) const override
SocketAddress(const SockAddr &sockAddr, SockLen sockAddrLen)
std::string getBtAddress() const
SocketAddress(uint8_t channel)
SocketAddress * init() final
std::string getBtAddress() const
uint8_t getChannel() const
ConfigAddress(net::config::ConfigInstance *instance, const std::string &addressOptionName, const std::string &addressOptionDescription)
ConfigAddress & setChannel(uint8_t channel)
CLI::Option * btAddressOpt
ConfigAddress & setBtAddress(const std::string &btAddress)
ConfigAddress & setSocketAddress(const SocketAddress &socketAddress)
ConfigAddress & setChannelRequired(bool required=true)
ConfigAddress & setBtAddressRequired(bool required=true)