![]() |
Thermal Camera SDK 10.0.1
SDK for Optris Thermal Cameras
|
Encapsulates an IP v4 address. More...
#include <IpAddress.h>
Public Member Functions | |
OTC_SDK_API | IpAddress () noexcept |
Constructor. | |
OTC_SDK_API | IpAddress (std::uint32_t address) noexcept |
Constructor. | |
OTC_SDK_API | IpAddress (const std::string &address) |
Constructor. | |
OTC_SDK_API | IpAddress (std::uint8_t a, std::uint8_t b, std::uint8_t c, std::uint8_t d) noexcept |
Constructor. | |
OTC_SDK_API void | reset () |
Resets all the bytes of the address to 0.0.0.0. | |
OTC_SDK_API void | setFromUInt32 (std::uint32_t address) noexcept |
Sets the address from an unsigned 32 bit integer in network byte order. | |
OTC_SDK_API std::uint32_t | toUInt32 () const noexcept |
Returns the address as an unsigned 32 bit integer in network byte order. | |
OTC_SDK_API void | setFromString (const std::string &address) |
Sets the address from a string in dot notation (a.b.c.d). | |
OTC_SDK_API std::string | toString () const noexcept |
Returns the address as a string in dot notation (a.b.c.d). | |
OTC_SDK_API void | setByte (int index, std::uint8_t value) |
Sets the value of the byte with the given index. | |
OTC_SDK_API std::uint8_t | getByte (int index) const |
Returns the value of the byte with the given index. | |
OTC_SDK_API bool | operator== (const IpAddress &rhs) const noexcept |
Equal operator. | |
OTC_SDK_API bool | operator!= (const IpAddress &rhs) const noexcept |
Unequal operator. | |
OTC_SDK_API bool | operator< (const IpAddress &rhs) const noexcept |
Less than operator. | |
Encapsulates an IP v4 address.
IP address are stored in an array in the following oder:
a.b.c.d => [0: a, 1: b, 2: c, 3: d]
|
noexcept |
Constructor.
[in] | address | as an unsigned 32 bit integer in network byte order. |
OTC_SDK_API optris::IpAddress::IpAddress | ( | const std::string & | address | ) |
Constructor.
[in] | address | string in dot notation (a.b.c.d). |
SDKException | if address string is invalid. |
|
noexcept |
Constructor.
[in] | a | byte from an a.b.c.d IP address. |
[in] | b | byte from an a.b.c.d IP address. |
[in] | c | byte from an a.b.c.d IP address. |
[in] | d | byte from an a.b.c.d IP address. |
OTC_SDK_API std::uint8_t optris::IpAddress::getByte | ( | int | index | ) | const |
Returns the value of the byte with the given index.
[in] | index | of the desired byte. |
SDKException | if the index is out of range. |
OTC_SDK_API void optris::IpAddress::setByte | ( | int | index, |
std::uint8_t | value ) |
Sets the value of the byte with the given index.
[in] | index | of the byte to set. |
[in] | value | to set. |
SDKException | if index is out of range. |
OTC_SDK_API void optris::IpAddress::setFromString | ( | const std::string & | address | ) |
Sets the address from a string in dot notation (a.b.c.d).
[in] | address | in dot notation. |
SDKException | if the address string is invalid. |
|
noexcept |
Sets the address from an unsigned 32 bit integer in network byte order.
[in] | address | as an unsigned 32 bit integer with the bytes in network order. |
|
noexcept |
Returns the address as a string in dot notation (a.b.c.d).
|
noexcept |
Returns the address as an unsigned 32 bit integer in network byte order.