ADTF  3.18.2
Converter< T, 1, 0 >

Partially specialized class for Signed Integers. More...

Inheritance diagram for Converter< T, 1, 0 >:
[legend]

Static Public Member Functions

static tResult Read (tUInt8 *pBuffer, tSize nStartBit, tSize nBitLength, T *pValue, tInt nEndianess)
 Read signed integer from bitfield. More...
 
static tResult Write (tUInt8 *pBuffer, tSize nStartBit, tSize nBitLength, T nValue, tInt nEndianess)
 Write signed integer to bitfield. More...
 

Additional Inherited Members

- Static Protected Member Functions inherited from ConverterBase< T >
static tResult ReadSignal (tUInt8 *pBuffer, tSize nStartBit, tSize nBitLength, T *pValue, tInt nEndianess=PLATFORM_BYTEORDER)
 Read value from bitfield. More...
 
static tResult WriteSignal (tUInt8 *pBuffer, tSize nStartBit, tSize nBitLength, T nValue, tInt nEndianess=PLATFORM_BYTEORDER)
 Write value to bitfield. More...
 
static tResult CutLeadingBits (tUInt64 *pValue, tSize nBitLength)
 Set the highest bits of a tUInt64 value to zero. More...
 
static tResult CopyBytesFromBuffer (tUInt8 *pBuffer, tUInt64 *pValue, tSize nStartBit, tSize nBitLength, tUInt64 *pNinthByte, tSize *pBytesToRead)
 Copy pBytesToRead number of bytes from the buffer to pValue and pNinthByte. More...
 

Detailed Description

template<typename T>
class A_UTILS_NS::bitconverters::Converter< T, 1, 0 >

Partially specialized class for Signed Integers.

Definition at line 483 of file builds/digitalwerk/solutions/adtf_content/adtf_base/adtf_core/src/libraries/a_utils/include/a_utils/core/bitserializer.h.

Member Function Documentation

◆ Read()

static tResult Read ( tUInt8 pBuffer,
tSize  nStartBit,
tSize  nBitLength,
T *  pValue,
tInt  nEndianess 
)
inlinestatic

Read signed integer from bitfield.

Parameters
[in]pBufferPointer to the memory buffer to read from.
[in]nStartBitBit position to start reading from. The least significant bit has the index 0.
[in]nBitLengthNumber of bits to read.
[out]pValuePointer to the variable to store the read value in.
[in]nEndianessParameter describing the endianess of the bitfield to read from. PLATFORM_BIG_ENDIAN_8: Bitfield interpreted as Big Endian. PLATFORM_LITTLE_ENDIAN_8: Bitfield interpreted as Little Endian. PLATFORM_BYTEORDER: Endianess can be neglected.
Returns
Returns a standard result code.

Definition at line 502 of file builds/digitalwerk/solutions/adtf_content/adtf_base/adtf_core/src/libraries/a_utils/include/a_utils/core/bitserializer.h.

References RETURN_IF_FAILED, and RETURN_NOERROR.

◆ Write()

static tResult Write ( tUInt8 pBuffer,
tSize  nStartBit,
tSize  nBitLength,
nValue,
tInt  nEndianess 
)
inlinestatic

Write signed integer to bitfield.

Parameters
[in]pBufferPointer to the memory buffer to write to.
[in]nStartBitBit position to start writing to. The least significant bit has the index 0.
[in]nBitLengthNumber of bits to write.
[out]nValueValue to write to the bitfield.
[in]nEndianessParameter describing the endianess of the bitfield to write to. PLATFORM_BIG_ENDIAN_8: Bitfield interpreted as Big Endian. PLATFORM_LITTLE_ENDIAN_8: Bitfield interpreted as Little Endian. PLATFORM_BYTEORDER: Endianess can be neglected.
Returns
Returns a standard result code.

Definition at line 527 of file builds/digitalwerk/solutions/adtf_content/adtf_base/adtf_core/src/libraries/a_utils/include/a_utils/core/bitserializer.h.

References ConverterBase< T >::WriteSignal().