Ocean
Ocean::Network::Data Class Reference

This class provides function handling different network data. More...

Inheritance diagram for Ocean::Network::Data:

Public Types

enum  OrderType : uint32_t { TYPE_BIG_ENDIAN , TYPE_LITTLE_ENDIAN , TYPE_READABLE }
 Definition of different order types. More...
 

Static Public Member Functions

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...
 

Detailed Description

This class provides function handling different network data.

Member Enumeration Documentation

◆ OrderType

Definition of different order types.

Enumerator
TYPE_BIG_ENDIAN 

Big endian type.

TYPE_LITTLE_ENDIAN 

Little endian type.

TYPE_READABLE 

Readable endian type which is platform specific.

Member Function Documentation

◆ fromBigEndian() [1/4]

int16_t Ocean::Network::Data::fromBigEndian ( const int16_t  value)
inlinestatic

Returns a value in local system bit order given as big-endian bit order.


E.g. local system bit order on windows platforms is little-endian.

Parameters
valueThe value to translate
Returns
Translated value

◆ fromBigEndian() [2/4]

int32_t Ocean::Network::Data::fromBigEndian ( const int32_t  value)
inlinestatic

Returns a value in local system bit order given as big-endian bit order.


E.g. local system bit order on windows platforms is little-endian.

Parameters
valueThe value to translate
Returns
Translated value

◆ fromBigEndian() [3/4]

uint16_t Ocean::Network::Data::fromBigEndian ( const uint16_t  value)
inlinestatic

Returns a value in local system bit order given as big-endian bit order.


E.g. local system bit order on windows platforms is little-endian.

Parameters
valueThe value to translate
Returns
Translated value

◆ fromBigEndian() [4/4]

uint32_t Ocean::Network::Data::fromBigEndian ( const uint32_t  value)
inlinestatic

Returns a value in local system bit order given as big-endian bit order.


E.g. local system bit order on windows platforms is little-endian.

Parameters
valueThe value to translate
Returns
Translated value

◆ toBigEndian() [1/4]

int16_t Ocean::Network::Data::toBigEndian ( const int16_t  value)
inlinestatic

Returns a value in big-endian order given in local system bit order.


E.g. local system order on Windows platforms is little-endian.

Parameters
valueThe value to translate
Returns
Translated value in bit-endian order

◆ toBigEndian() [2/4]

int Ocean::Network::Data::toBigEndian ( const int32_t  value)
inlinestatic

Returns a value in big-endian order given in local system bit order.


E.g. local system order on Windows platforms is little-endian.

Parameters
valueThe value to translate
Returns
Translated value in bit-endian order

◆ toBigEndian() [3/4]

uint16_t Ocean::Network::Data::toBigEndian ( const uint16_t  value)
inlinestatic

Returns a value in big-endian order given in local system bit order.


E.g. local system order on Windows platforms is little-endian.

Parameters
valueThe value to translate
Returns
Translated value in bit-endian order

◆ toBigEndian() [4/4]

uint32_t Ocean::Network::Data::toBigEndian ( const uint32_t  value)
inlinestatic

Returns a value in big-endian order given in local system bit order.


E.g. local system order on Windows platforms is little-endian.

Parameters
valueThe value to translate
Returns
Translated value in bit-endian order

The documentation for this class was generated from the following file: