|
| Port ()=default |
| Creates a new port object with zero as default value. More...
|
|
| Port (const uint16_t port) |
| Creates a new port object. More...
|
|
| Port (const uint16_t port, const OrderType orderType) |
| Creates a new port object by a given port number in big-endian, little-endian order or local platform order. More...
|
|
uint16_t | littleEndian () const |
| Returns the port number in little-endian order. More...
|
|
uint16_t | readable () const |
| Returns the port number in a readable order. More...
|
|
bool | isValid () const |
| Returns whether this port hold a non-zero value. More...
|
|
bool | isNull () const |
| Returns whether this port holds a zero value. More...
|
|
bool | operator== (const Port &port) const |
| Returns whether two port number are identical. More...
|
|
bool | operator!= (const Port &port) const |
| Returns whether two port number are not identical. More...
|
|
| operator uint16_t () const |
| Casts the wrapped port number. More...
|
|
|
enum | OrderType : uint32_t { TYPE_BIG_ENDIAN
, TYPE_LITTLE_ENDIAN
, TYPE_READABLE
} |
| Definition of different order types. More...
|
|
static int | toBigEndian (const int32_t value) |
| Returns a value in big-endian order given in local system bit order. More...
|
|
static uint32_t | toBigEndian (const uint32_t value) |
| Returns a value in big-endian order given in local system bit order. More...
|
|
static int16_t | toBigEndian (const int16_t value) |
| Returns a value in big-endian order given in local system bit order. More...
|
|
static uint16_t | toBigEndian (const uint16_t value) |
| Returns a value in big-endian order given in local system bit order. More...
|
|
static int32_t | fromBigEndian (const int32_t value) |
| Returns a value in local system bit order given as big-endian bit order. More...
|
|
static uint32_t | fromBigEndian (const uint32_t value) |
| Returns a value in local system bit order given as big-endian bit order. More...
|
|
static int16_t | fromBigEndian (const int16_t value) |
| Returns a value in local system bit order given as big-endian bit order. More...
|
|
static uint16_t | fromBigEndian (const uint16_t value) |
| Returns a value in local system bit order given as big-endian bit order. More...
|
|
This class wraps a port number with 16 bits.
Internally, the port number is stored in big-endian order.