13#ifndef __BAOSLIB_IPV4INTERFACE_H__
14#define __BAOSLIB_IPV4INTERFACE_H__
100 std::string ip4Address_;
168 using PasswordHash = std::array<std::uint8_t, 16>;
169 using AuthenticationCode = std::array<std::uint8_t, 16>;
180 std::uint16_t port = 12004);
198 std::uint16_t port = 12004);
214 static PasswordHash calculatePasswordHash(
const std::string&
password);
215 static AuthenticationCode calculateDeviceAuthenticationCode(
const std::string&
secret);
218 PasswordHash passwordHash_;
219 std::optional<AuthenticationCode> authenticationCode_;
The high level API for BAOS devices.
Global BAOS protocol defines and types.
This class represents a BAOS device.
Definition BaosDevice.h:72
Represents a BAOS IP4 device with an underlying TCP connection (with BAOS unsecure connection-oriente...
Definition BaosIpv4Device.h:140
BaosConnection_UPtr getConnection() override
Pure virtual function to get a BaosConnection to the device.
BaosConOrientedIp4Device(const std::string &ip4Address, std::uint16_t port=12004)
Construct a new Baos Ip 4 Device object from an ip address and a port.
A specialization for (connection oriented) connection to the BAOS device via a TCP connection.
Definition BaosTcpConnection.h:182
Represents a BAOS IP4 device with an underlying TCP connection (with BAOS unsecure connection-less)
Definition BaosIpv4Device.h:55
BaosConnection_UPtr getConnection() override
Get a BaosConnection to the device.
void enableVerifyProtocolVersion(bool enable)
Enables the option for verify the BAOS binary protocol version. The default value is true (enabled).
BaosIp4Device(const std::string &ip4Address, std::uint16_t port=12004)
Construct a new Baos Ip 4 Device object from an ip address and a port.
void setConnectionData(const std::string &ip4Address, std::uint16_t port=12004)
Explicitly sets the connection data for a Baos Ip 4 Device object from an ip address and a port.
void enableEnsureAutoConnect(bool enable)
Enables the option for ensure auto connect in legacy mode (e.g. 774.1 with auto connect mode)....
Represents a BAOS IP4 device with an underlying TCP connection (with BAOS secure)
Definition BaosIpv4Device.h:166
void setConnectionData(const std::string &ip4Address, const PasswordHash &passwordHash, std::uint16_t port=12004)
Explicitly sets the connection data for a secure Baos Ip 4 Device object.
BaosConnection_UPtr getConnection() override
Get a BaosConnection to the device.
BaosSecureIp4Device(const std::string &ip4Address, const PasswordHash &passwordHash, std::uint16_t port=12004)
Construct a new Baos Ip 4 Device object from an ip address and a port.
void setConnectionData(const std::string &ip4Address, const PasswordHash &passwordHash, const AuthenticationCode &authenticationCode, std::uint16_t port=12004)
Explicitly sets the connection data for a secure Baos Ip 4 Device object.
bool verifyProtocolVersion_
Definition BaosTcpConnection.h:123
bool ensureAutoConnect_
Definition BaosTcpConnection.h:122
Global types and configuration for the whole SDK.
std::unique_ptr< BaosConnection > BaosConnection_UPtr
Alias for a std::unique pointer of a BaosConnection.
Definition BaosDevice.h:43