|
| | Port ()=default |
| | Creates a new port object with zero as default value.
|
| |
| | Port (const uint16_t port) |
| | Creates a new port object.
|
| |
| | 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.
|
| |
| uint16_t | littleEndian () const |
| | Returns the port number in little-endian order.
|
| |
| uint16_t | readable () const |
| | Returns the port number in a readable order.
|
| |
| bool | isValid () const |
| | Returns whether this port hold a non-zero value.
|
| |
| bool | isNull () const |
| | Returns whether this port holds a zero value.
|
| |
| bool | operator== (const Port &port) const |
| | Returns whether two port number are identical.
|
| |
| bool | operator!= (const Port &port) const |
| | Returns whether two port number are not identical.
|
| |
| | operator uint16_t () const |
| | Casts the wrapped port number.
|
| |
|
| 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.
|
| |
| static uint32_t | toBigEndian (const uint32_t value) |
| | Returns a value in big-endian order given in local system bit order.
|
| |
| static int16_t | toBigEndian (const int16_t value) |
| | Returns a value in big-endian order given in local system bit order.
|
| |
| static uint16_t | toBigEndian (const uint16_t value) |
| | Returns a value in big-endian order given in local system bit order.
|
| |
| static int32_t | fromBigEndian (const int32_t value) |
| | Returns a value in local system bit order given as big-endian bit order.
|
| |
| static uint32_t | fromBigEndian (const uint32_t value) |
| | Returns a value in local system bit order given as big-endian bit order.
|
| |
| static int16_t | fromBigEndian (const int16_t value) |
| | Returns a value in local system bit order given as big-endian bit order.
|
| |
| static uint16_t | fromBigEndian (const uint16_t value) |
| | Returns a value in local system bit order given as big-endian bit order.
|
| |
This class wraps a port number with 16 bits.
Internally, the port number is stored in big-endian order.