libdoip  0.1.0
DoIP (Diagnostics over Internet Protocol) ISO 13400 C++17 Library
doip::util Namespace Reference

Functions

uint16_t readU16BE (const uint8_t *data, size_t index)
 Reads a 16-bit unsigned integer in big-endian format from a byte array. More...
 
uint32_t readU32BE (const uint8_t *data, size_t index)
 Reads a 32-bit unsigned integer in big-endian format from a byte array. More...
 

Function Documentation

◆ readU16BE()

uint16_t doip::util::readU16BE ( const uint8_t *  data,
size_t  index 
)
inline

Reads a 16-bit unsigned integer in big-endian format from a byte array.

Parameters
dataPointer to the byte array
indexStarting index in the array
Returns
uint16_t The 16-bit value read from the array
Examples
/home/runner/work/libdoip/libdoip/inc/ByteArray.h.

Definition at line 30 of file ByteArray.h.

Referenced by doip::ByteArray::readU16BE().

◆ readU32BE()

uint32_t doip::util::readU32BE ( const uint8_t *  data,
size_t  index 
)
inline

Reads a 32-bit unsigned integer in big-endian format from a byte array.

Parameters
dataPointer to the byte array
indexStarting index in the array
Returns
uint32_t The 32-bit value read from the array
Examples
/home/runner/work/libdoip/libdoip/inc/ByteArray.h.

Definition at line 42 of file ByteArray.h.

Referenced by doip::ByteArray::readU32BE(), and doip::DoIPMessage::tryParseHeader().