![]() |
Thermal Camera SDK 10.1.1
SDK for Optris Thermal Cameras
|
Encapsulates a media access control address (MAC address). More...
#include <MacAddress.h>

Public Member Functions | |
| OTC_SDK_API | MacAddress () noexcept |
| Constructor. | |
| OTC_SDK_API | MacAddress (std::uint64_t mac) |
| Constructor. | |
| OTC_SDK_API | MacAddress (const std::string &mac) |
| Constructor. | |
| OTC_SDK_API | MacAddress (std::uint8_t a, std::uint8_t b, std::uint8_t c, std::uint8_t d, std::uint8_t e, std::uint8_t f) noexcept |
| Constructor. | |
| OTC_SDK_API void | reset () noexcept |
| Resets all the bytes of the MAC address to 0 (0:0:0:0:0:0). | |
| OTC_SDK_API void | setFromUInt64 (std::uint64_t mac) |
| Sets the MAC address from an unsigned 64 bit integer. | |
| OTC_SDK_API std::uint64_t | toUInt64 () const noexcept |
| Returns the MAC address as an unsigned 64 bit integer. | |
| OTC_SDK_API void | setFromString (const std::string &mac) |
| Sets the MAC address from the given string. | |
| OTC_SDK_API std::string | toString () const noexcept |
| Returns the MAC address as a string in colon notation (a:b:c:d:e:f). | |
| 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. | |
| bool | operator== (const MacAddress &rhs) const noexcept |
| Equality operator. | |
| bool | operator== (const std::uint64_t &rhs) const |
| Equality operator. | |
| bool | operator!= (const MacAddress &rhs) const noexcept |
| Unequality operator. | |
Encapsulates a media access control address (MAC address).
A MAC address is usually specified by six bytes in hex notation separated by colons, like this:
12:34:56:78:9a:bc
|
noexcept |
Constructor.
All MAC address bytes are set to 0.
| OTC_SDK_API optris::MacAddress::MacAddress | ( | std::uint64_t | mac | ) |
Constructor.
| [in] | mac | address as an unsigned 64 bit integer. |
| SDKException | if the given value is outside [0x00, 0xffffffffffff]. |
| OTC_SDK_API optris::MacAddress::MacAddress | ( | const std::string & | mac | ) |
Constructor.
| [in] | mac | address string in colon notation (a:b:c:d:e:f). |
| SDKException | if the given string does not contain a valid MAC address. |
|
noexcept |
Constructor.
| [in] | a | byte from an a:b:c:d:e:f MAC address. |
| [in] | b | byte from an a:b:c:d:e:f MAC address. |
| [in] | c | byte from an a:b:c:d:e:f MAC address. |
| [in] | d | byte from an a:b:c:d:e:f MAC address. |
| [in] | e | byte from an a:b:c:d:e:f MAC address. |
| [in] | f | byte from an a:b:c:d:e:f MAC address. |
| OTC_SDK_API std::uint8_t optris::MacAddress::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::MacAddress::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::MacAddress::setFromString | ( | const std::string & | mac | ) |
Sets the MAC address from the given string.
| [in] | mac | address string in colon notation (a:b:c:d:e:f). |
| SDKException | if the given string does not contain a valid mac address. |
| OTC_SDK_API void optris::MacAddress::setFromUInt64 | ( | std::uint64_t | mac | ) |
Sets the MAC address from an unsigned 64 bit integer.
| [in] | mac | address as an unsigned 64 bit integer. |
| SDKException | if the given value is outside [0x00, 0xffffffffffff]. |
|
noexcept |
Returns the MAC address as a string in colon notation (a:b:c:d:e:f).
|
noexcept |
Returns the MAC address as an unsigned 64 bit integer.