RTRlib
Loading...
Searching...
No Matches
convert_byte_order_private.h File Reference
#include <inttypes.h>

Go to the source code of this file.

Enumerations

enum  target_byte_order { TO_NETWORK_BYTE_ORDER , TO_HOST_HOST_BYTE_ORDER }
 Target byte order for conversion. More...
 

Functions

uint16_t lrtr_convert_short (const enum target_byte_order tbo, const uint16_t value)
 Converts the passed short value to the given target byte order.
 
uint32_t lrtr_convert_long (const enum target_byte_order tbo, const uint32_t value)
 Converts the passed long value to the given target byte order.
 

Enumeration Type Documentation

◆ target_byte_order

Target byte order for conversion.

Enumerator
TO_NETWORK_BYTE_ORDER 
TO_HOST_HOST_BYTE_ORDER 

Function Documentation

◆ lrtr_convert_long()

uint32_t lrtr_convert_long ( const enum target_byte_order  tbo,
const uint32_t  value 
)

Converts the passed long value to the given target byte order.

Parameters
[in]tboTarget byte order.
[in]valueInput (uint32_t) for conversion.
Returns
Converted uint32_t value.

◆ lrtr_convert_short()

uint16_t lrtr_convert_short ( const enum target_byte_order  tbo,
const uint16_t  value 
)

Converts the passed short value to the given target byte order.

Parameters
[in]tboTarget byte order.
[in]valueInput (uint16_t) for conversion.
Returns
Converted uint16_t value.