ADTF  3.18.2
builds/digitalwerk/solutions/adtf_content/adtf_base/adtf_core/src/libraries/a_utils/include/a_utils/core/bitserializer.h File Reference

Copyright © Audi Electronics Venture GmbH. More...

Go to the source code of this file.

Classes

class  ConverterBase< T >
 Converter Base Contains the base methods used by all inheriting Converter classes. More...
 
class  Converter< T, 0, 0 >
 Partially specialized class for Unsigned Integers. More...
 
class  Converter< T, 1, 0 >
 Partially specialized class for Signed Integers. More...
 
class  Converter< T, 1, 1 >
 Specialized class for Floats (Floats are always signed!) More...
 
class  cBitSerializer
 Bit Serializer Class. More...
 

Namespaces

 A_UTILS_NS
 ADTF A_UTIL Namespace - Within adtf this is used as adtf::util or adtf_util.
 

Functions

tVoid PrintBits (tUInt64 nValue)
 Write the bit pattern of a tUInt64 value to a string and prints it. More...
 
tResult ConvertSignalEndianess (tUInt64 *pSignal, tInt nEndianess, tSize nBitLength)
 Convert the endianess of a signal by correctly swapping the byte order if required. More...
 

Detailed Description

Copyright © Audi Electronics Venture GmbH.

All rights reserved

Definition in file builds/digitalwerk/solutions/adtf_content/adtf_base/adtf_core/src/libraries/a_utils/include/a_utils/core/bitserializer.h.

Function Documentation

◆ ConvertSignalEndianess()

tResult A_UTILS_NS::bithelpers::ConvertSignalEndianess ( tUInt64 pSignal,
tInt  nEndianess,
tSize  nBitLength 
)

Convert the endianess of a signal by correctly swapping the byte order if required.

The variable pSignal is a tUInt64, but the value that needs conversion might be smaller. The parameter nBitLength determines if a 16, 32 or 64 value should be swapped. For a LE system, reading BE signals of 3, 5, 6 or 7 bytes length the value will be aligned within a 4 or 8 byte value before swapping bytes.

Parameters
[in,out]pSignalPointer to the variable to store the read value in.
[in]nEndianessParameter describing the endianess of the bitfield to convert. PLATFORM_BIG_ENDIAN_8: Bitfield interpreted as Big Endian. PLATFORM_LITTLE_ENDIAN_8: Bitfield interpreted as Little Endian. PLATFORM_BYTEORDER: Endianess can be neglected.
[in]nBitLengthNumber of bits to read.
Returns
Returns a standard result code.

References A_UTILS_NS::bithelpers::ConvertSignalEndianess().

Referenced by A_UTILS_NS::bithelpers::ConvertSignalEndianess().

◆ PrintBits()

tVoid A_UTILS_NS::bithelpers::PrintBits ( tUInt64  nValue)

Write the bit pattern of a tUInt64 value to a string and prints it.

Used for debug purposes.

Parameters
[in]nValueThe value to print.

References A_UTILS_NS::bithelpers::PrintBits().

Referenced by A_UTILS_NS::bithelpers::PrintBits().