arcsdec::v_1_0_0::LittleEndianBytes struct final

Service: interpret sequences of 2 or 4 little-endian bytes as integer.

Public static functions

static auto to_int16(const char& b1, const char& b2) -> int16_t
Service method: Interpret 2 bytes as a 16 bit (signed) integer with little endian storage, which means that the bits of b2 become the most significant bits of the result.
static auto to_int32(const char& b1, const char& b2, const char& b3, const char& b4) -> int32_t
Service method: Interpret 4 bytes as a 32 bit (signed) integer with little endian storage, which means that the bits of b4 become the most significant bits of the result.
static auto to_uint16(const char& b1, const char& b2) -> uint16_t
Service method: Interpret 2 bytes as a 16 bit unsigned integer with little endian storage, which means that the bits of b2 become the most significant bits of the result.
static auto to_uint32(const char& b1, const char& b2, const char& b3, const char& b4) -> uint32_t
Service method: Interpret 4 bytes as a 32 bit unsigned integer with little endian storage, which means that the bits of b4 become the most significant bits of the result.

Function documentation

static int16_t arcsdec::v_1_0_0::LittleEndianBytes::to_int16(const char& b1, const char& b2)

Service method: Interpret 2 bytes as a 16 bit (signed) integer with little endian storage, which means that the bits of b2 become the most significant bits of the result.

Parameters
b1 in First input byte, provides least significant bits of the result
b2 in Second input byte, provides most significant bits of the result
Returns The bytes as 16 bit (signed) integer

static int32_t arcsdec::v_1_0_0::LittleEndianBytes::to_int32(const char& b1, const char& b2, const char& b3, const char& b4)

Service method: Interpret 4 bytes as a 32 bit (signed) integer with little endian storage, which means that the bits of b4 become the most significant bits of the result.

Parameters
b1 in First input byte, provides least significant bits of the result
b2 in Second input byte
b3 in Third input byte
b4 in Fourth input byte, provides most significant bits of the result
Returns The bytes as 32 bit (signed) integer

static uint16_t arcsdec::v_1_0_0::LittleEndianBytes::to_uint16(const char& b1, const char& b2)

Service method: Interpret 2 bytes as a 16 bit unsigned integer with little endian storage, which means that the bits of b2 become the most significant bits of the result.

Parameters
b1 in First input byte, provides least significant bits of the result
b2 in Second input byte, provides most significant bits of the result
Returns The bytes as 16 bit unsigned integer

static uint32_t arcsdec::v_1_0_0::LittleEndianBytes::to_uint32(const char& b1, const char& b2, const char& b3, const char& b4)

Service method: Interpret 4 bytes as a 32 bit unsigned integer with little endian storage, which means that the bits of b4 become the most significant bits of the result.

Parameters
b1 in First input byte, provides least significant bits of the result
b2 in Second input byte
b3 in Third input byte
b4 in Fourth input byte, provides most significant bits of the result
Returns The bytes as 32 bit unsigned integer