supla-device
Loading...
Searching...
No Matches
src
supla
network
ip_address.h
1
// SPDX-FileCopyrightText: AC SOFTWARE SP. Z O.O.
2
// SPDX-License-Identifier: GPL-2.0-or-later
3
4
#ifndef SRC_SUPLA_NETWORK_IP_ADDRESS_H_
5
#define SRC_SUPLA_NETWORK_IP_ADDRESS_H_
6
7
#ifdef ARDUINO
8
#include <IPAddress.h>
9
#else
10
11
#include <stdint.h>
12
13
#include <string>
14
15
class
IPAddress
{
16
public
:
17
IPAddress
();
18
IPAddress
(uint8_t ip1, uint8_t ip2, uint8_t ip3, uint8_t ip4);
19
explicit
IPAddress
(
const
std::string &ip);
20
21
uint8_t operator[](
int
index)
const
;
22
uint8_t& operator[](
int
index);
23
24
protected
:
25
union
{
26
uint8_t addr[4] = {};
27
uint32_t full;
28
};
29
};
30
#endif
31
32
#endif
// SRC_SUPLA_NETWORK_IP_ADDRESS_H_
IPAddress
Definition
ip_address.h:15
Generated by
1.12.0