![]() |
Thermal Camera SDK 10.0.1
SDK for Optris Thermal Cameras
|
Encapsulates a network port number. More...
#include <Port.h>
Public Types | |
using | Number = std::uint16_t |
Type used to store the port number. | |
Public Member Functions | |
Port () noexcept | |
Constructor. | |
Port (Number number) noexcept | |
Constructor. | |
Port (const std::string &port) | |
Sets the port number from the given string. | |
void | reset () noexcept |
Resets the port number to 0. | |
void | setNumber (Number number) noexcept |
Sets the port number to the given value. | |
Number | getNumber () const noexcept |
Returns the port number. | |
OTC_SDK_API void | setFromString (const std::string &port) noexcept(false) |
Sets the port number from the given string. | |
OTC_SDK_API std::string | toString () const noexcept |
Returns the port number as a string. | |
bool | operator== (const Port &rhs) const noexcept |
Equality operator. | |
bool | operator!= (const Port &rhs) const noexcept |
Unequality operator. | |
bool | operator< (const Port &rhs) const noexcept |
Less than operator. | |
Encapsulates a network port number.
Port number a usually separated by a : from an IP address like
192.168.0.2:50101
Here the port number is 50101.
|
inlinenoexcept |
Constructor.
The port number is set to 0.
|
inlinenoexcept |
Constructor.
Native byte order is expected.
[in] | number | of the port in [0, 65535]. |
|
inline |
Sets the port number from the given string.
[in] | port | string. |
SDKException | if the given string does not contain a valid port number. |
|
inlinenoexcept |
Returns the port number.
Native byte order is used.
OTC_SDK_API void optris::Port::setFromString | ( | const std::string & | port | ) |
Sets the port number from the given string.
[in] | port | number string. |
SDKException | if the given string does not contain a valid port number. |
|
inlinenoexcept |
Sets the port number to the given value.
Native byte order is expected.
[in] | number | port number to set. |
|
noexcept |
Returns the port number as a string.