Dataflow Runtime API  3.1.1.0
Static Public Member Functions | List of all members
imt::base::core::util::ByteWordUtil Class Reference

Contains some helpful converting tools. More...

#include <Imt.Base.Core.Util/ByteWordUtil.h>

Static Public Member Functions

static uint32_t makeDoubleWord (const uint16_t lowerWord, const uint16_t upperWord)
 Creates a doubleWord containing the low and high word. More...
 
static uint64_t make8ByteWord (const uint32_t lowerPart, const uint32_t upperPart)
 Creates a 8 byte Word containing the low and high 4 byte word. More...
 
static uint16_t makeWord (const uint8_t lowerByte, const uint8_t upperByte)
 Creates a word containing the low and high byte. More...
 
static uint8_t lowByte (const uint16_t data)
 Returns the low byte of a word. More...
 
static uint8_t highByte (const uint16_t data)
 Returns the high byte of a word. More...
 
static uint8_t highByteOfHighWord (const uint32_t data)
 Returns the high byte of the high word of a double word. More...
 
static uint8_t lowByteOfHighWord (const uint32_t data)
 Returns the low byte of the high word of a double word. More...
 
static uint8_t highByteOfLowWord (const uint32_t data)
 Returns the high byte of the low word of a double word. More...
 
static uint8_t lowByteOfLowWord (const uint32_t data)
 Returns the low byte of the low word of a double word. More...
 
static uint16_t highWordOfDoubleWord (const uint32_t data)
 Returns the high word of a double word. More...
 
static uint16_t lowWordOfDoubleWord (const uint32_t data)
 Returns the low word of a double word. More...
 
static uint32_t highPartOf8ByteWord (const uint64_t data)
 Returns the high part of an 8 byte word. More...
 
static uint32_t lowPartOf8ByteWord (const uint64_t data)
 Returns the low part of an 8 byte word. More...
 
static void write (uint8_t *const pBuffer, const uint64_t data)
 Writing into a byte buffer. More...
 
static void write (uint8_t *const pBuffer, const int64_t data)
 Writing into a byte buffer. More...
 
static void write (uint8_t *const pBuffer, const uint32_t data)
 Writing into a byte buffer. More...
 
static void write (uint8_t *const pBuffer, const int32_t data)
 Writing into a byte buffer. More...
 
static void write (uint8_t *const pBuffer, const uint16_t data)
 Writing into a byte buffer. More...
 
static void write (uint8_t *const pBuffer, const int16_t data)
 Writing into a byte buffer. More...
 
static void write (uint8_t *const pBuffer, const float32_t data)
 Writing into a byte buffer. More...
 
static void write (uint8_t *const pBuffer, const float64_t data)
 Writing into a byte buffer. More...
 
static void write (uint8_t *const pBuffer, const bool data)
 Writing into a byte buffer. More...
 
static void read (const uint8_t *const pBuffer, uint64_t &data)
 Reading from a byte buffer. More...
 
static void read (const uint8_t *const pBuffer, int64_t &data)
 Reading from a byte buffer. More...
 
static void read (const uint8_t *const pBuffer, uint32_t &data)
 Reading from a byte buffer. More...
 
static void read (const uint8_t *const pBuffer, int32_t &data)
 Reading from a byte buffer. More...
 
static void read (const uint8_t *const pBuffer, uint16_t &data)
 Reading from a byte buffer. More...
 
static void read (const uint8_t *const pBuffer, int16_t &data)
 Reading from a byte buffer. More...
 
static void read (const uint8_t *const pBuffer, float32_t &data)
 Reading from a byte buffer. More...
 
static void read (const uint8_t *const pBuffer, float64_t &data)
 Reading from a byte buffer. More...
 
static void read (const uint8_t *const pBuffer, bool &data)
 Reading from a byte buffer. More...
 

Detailed Description

Contains some helpful converting tools.

Is purely static.

Member Function Documentation

◆ highByte()

static uint8_t imt::base::core::util::ByteWordUtil::highByte ( const uint16_t  data)
static

Returns the high byte of a word.

Parameters
dataThe word from which the high byte has to be segregated.
Returns
the high byte.

◆ highByteOfHighWord()

static uint8_t imt::base::core::util::ByteWordUtil::highByteOfHighWord ( const uint32_t  data)
static

Returns the high byte of the high word of a double word.

A byte is a uin8_t.

Parameters
dataThe data from which the high byte of the high word will be extracted.
Returns
the high byte.

◆ highByteOfLowWord()

static uint8_t imt::base::core::util::ByteWordUtil::highByteOfLowWord ( const uint32_t  data)
static

Returns the high byte of the low word of a double word.

A byte is a uin8_t.

Parameters
dataThe data from which the high byte of the low word will be extracted.
Returns
the high byte.

◆ highPartOf8ByteWord()

static uint32_t imt::base::core::util::ByteWordUtil::highPartOf8ByteWord ( const uint64_t  data)
static

Returns the high part of an 8 byte word.

Parameters
dataThe data from which the high part will be extracted.
Returns
the high part as double word.

◆ highWordOfDoubleWord()

static uint16_t imt::base::core::util::ByteWordUtil::highWordOfDoubleWord ( const uint32_t  data)
static

Returns the high word of a double word.

A word is a uin16_t.

Parameters
dataThe data from which the high word of the double word will be extracted.
Returns
the high word.

◆ lowByte()

static uint8_t imt::base::core::util::ByteWordUtil::lowByte ( const uint16_t  data)
static

Returns the low byte of a word.

Parameters
dataThe word from which the low byte has to be segregated.
Returns
the low byte.

◆ lowByteOfHighWord()

static uint8_t imt::base::core::util::ByteWordUtil::lowByteOfHighWord ( const uint32_t  data)
static

Returns the low byte of the high word of a double word.

A byte is a uin8_t.

Parameters
dataThe data from which the low byte of the high word will be extracted.
Returns
the high byte.

◆ lowByteOfLowWord()

static uint8_t imt::base::core::util::ByteWordUtil::lowByteOfLowWord ( const uint32_t  data)
static

Returns the low byte of the low word of a double word.

A byte is a uin8_t.

Parameters
dataThe data from which the low byte of the low word will be extracted.
Returns
the low byte.

◆ lowPartOf8ByteWord()

static uint32_t imt::base::core::util::ByteWordUtil::lowPartOf8ByteWord ( const uint64_t  data)
static

Returns the low part of an 8 byte word.

Parameters
dataThe data from which the low part will be extracted.
Returns
the low part as double word.

◆ lowWordOfDoubleWord()

static uint16_t imt::base::core::util::ByteWordUtil::lowWordOfDoubleWord ( const uint32_t  data)
static

Returns the low word of a double word.

A word is a uin16_t.

Parameters
dataThe data from which the low word of the double word will be extracted.
Returns
the low word.

◆ make8ByteWord()

static uint64_t imt::base::core::util::ByteWordUtil::make8ByteWord ( const uint32_t  lowerPart,
const uint32_t  upperPart 
)
static

Creates a 8 byte Word containing the low and high 4 byte word.

Parameters
lowerPartLow part of the word to create.
upperPartHigh part of the word to create.
Returns
the created 8 byte word.

◆ makeDoubleWord()

static uint32_t imt::base::core::util::ByteWordUtil::makeDoubleWord ( const uint16_t  lowerWord,
const uint16_t  upperWord 
)
static

Creates a doubleWord containing the low and high word.

Parameters
lowerWordLow word of the double word to create.
upperWordHigh word of the double word to create.
Returns
the created double word.

◆ makeWord()

static uint16_t imt::base::core::util::ByteWordUtil::makeWord ( const uint8_t  lowerByte,
const uint8_t  upperByte 
)
static

Creates a word containing the low and high byte.

Parameters
lowerByteLow byte of the created word.
upperByteHigh byte of the created word.
Returns
the created word.

◆ read() [1/9]

static void imt::base::core::util::ByteWordUtil::read ( const uint8_t *const  pBuffer,
bool data 
)
static

Reading from a byte buffer.

A number of bytes based on the size of the target data is read to the buffer.

Parameters
pBufferThe buffer from which the data is read.
dataThe read data is written to data.

◆ read() [2/9]

static void imt::base::core::util::ByteWordUtil::read ( const uint8_t *const  pBuffer,
float32_t data 
)
static

Reading from a byte buffer.

A number of bytes based on the size of the target data is read to the buffer.

Parameters
pBufferThe buffer from which the data is read.
dataThe read data is written to data.

◆ read() [3/9]

static void imt::base::core::util::ByteWordUtil::read ( const uint8_t *const  pBuffer,
float64_t data 
)
static

Reading from a byte buffer.

A number of bytes based on the size of the target data is read to the buffer.

Parameters
pBufferThe buffer from which the data is read.
dataThe read data is written to data.

◆ read() [4/9]

static void imt::base::core::util::ByteWordUtil::read ( const uint8_t *const  pBuffer,
int16_t data 
)
static

Reading from a byte buffer.

A number of bytes based on the size of the target data is read to the buffer.

Parameters
pBufferThe buffer from which the data is read.
dataThe read data is written to data.

◆ read() [5/9]

static void imt::base::core::util::ByteWordUtil::read ( const uint8_t *const  pBuffer,
int32_t data 
)
static

Reading from a byte buffer.

A number of bytes based on the size of the target data is read to the buffer.

Parameters
pBufferThe buffer from which the data is read.
dataThe read data is written to data.

◆ read() [6/9]

static void imt::base::core::util::ByteWordUtil::read ( const uint8_t *const  pBuffer,
int64_t data 
)
static

Reading from a byte buffer.

A number of bytes based on the size of the target data is read to the buffer.

Parameters
pBufferThe buffer from which the data is read.
dataThe read data is written to data.

◆ read() [7/9]

static void imt::base::core::util::ByteWordUtil::read ( const uint8_t *const  pBuffer,
uint16_t data 
)
static

Reading from a byte buffer.

A number of bytes based on the size of the target data is read to the buffer.

Parameters
pBufferThe buffer from which the data is read.
dataThe read data is written to data.

◆ read() [8/9]

static void imt::base::core::util::ByteWordUtil::read ( const uint8_t *const  pBuffer,
uint32_t data 
)
static

Reading from a byte buffer.

A number of bytes based on the size of the target data is read to the buffer.

Parameters
pBufferThe buffer from which the data is read.
dataThe read data is written to data.

◆ read() [9/9]

static void imt::base::core::util::ByteWordUtil::read ( const uint8_t *const  pBuffer,
uint64_t data 
)
static

Reading from a byte buffer.

A number of bytes based on the size of the target data is read to the buffer.

Parameters
pBufferThe buffer from which the data is read.
dataThe read data is written to data.

◆ write() [1/9]

static void imt::base::core::util::ByteWordUtil::write ( uint8_t *const  pBuffer,
const bool  data 
)
static

Writing into a byte buffer.

A number of bytes based on the size of the passed data is written to the buffer.

Parameters
pBufferThe buffer to which the data is written.
dataThe data to write

◆ write() [2/9]

static void imt::base::core::util::ByteWordUtil::write ( uint8_t *const  pBuffer,
const float32_t  data 
)
static

Writing into a byte buffer.

A number of bytes based on the size of the passed data is written to the buffer.

Parameters
pBufferThe buffer to which the data is written.
dataThe data to write

◆ write() [3/9]

static void imt::base::core::util::ByteWordUtil::write ( uint8_t *const  pBuffer,
const float64_t  data 
)
static

Writing into a byte buffer.

A number of bytes based on the size of the passed data is written to the buffer.

Parameters
pBufferThe buffer to which the data is written.
dataThe data to write

◆ write() [4/9]

static void imt::base::core::util::ByteWordUtil::write ( uint8_t *const  pBuffer,
const int16_t  data 
)
static

Writing into a byte buffer.

A number of bytes based on the size of the passed data is written to the buffer.

Parameters
pBufferThe buffer to which the data is written.
dataThe data to write

◆ write() [5/9]

static void imt::base::core::util::ByteWordUtil::write ( uint8_t *const  pBuffer,
const int32_t  data 
)
static

Writing into a byte buffer.

A number of bytes based on the size of the passed data is written to the buffer.

Parameters
pBufferThe buffer to which the data is written.
dataThe data to write

◆ write() [6/9]

static void imt::base::core::util::ByteWordUtil::write ( uint8_t *const  pBuffer,
const int64_t  data 
)
static

Writing into a byte buffer.

A number of bytes based on the size of the passed data is written to the buffer.

Parameters
pBufferThe buffer to which the data is written.
dataThe data to write

◆ write() [7/9]

static void imt::base::core::util::ByteWordUtil::write ( uint8_t *const  pBuffer,
const uint16_t  data 
)
static

Writing into a byte buffer.

A number of bytes based on the size of the passed data is written to the buffer.

Parameters
pBufferThe buffer to which the data is written.
dataThe data to write

◆ write() [8/9]

static void imt::base::core::util::ByteWordUtil::write ( uint8_t *const  pBuffer,
const uint32_t  data 
)
static

Writing into a byte buffer.

A number of bytes based on the size of the passed data is written to the buffer.

Parameters
pBufferThe buffer to which the data is written.
dataThe data to write

◆ write() [9/9]

static void imt::base::core::util::ByteWordUtil::write ( uint8_t *const  pBuffer,
const uint64_t  data 
)
static

Writing into a byte buffer.

A number of bytes based on the size of the passed data is written to the buffer.

Parameters
pBufferThe buffer to which the data is written.
dataThe data to write

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