ADTF  3.18.4
workspace/conan/dev_essential/1.3.4/dw/stable/package/37682420cd166e229516a41c8d6a139a0b13e1e1/include/ddl/codec/bitserializer.h File Reference

Raw memory related functionality. 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  BitSerializer
 Bit Serializer Class. More...
 

Namespaces

 a_util
 Serves as the root component, with common functionality documented in core functionality.
 
 a_util::memory
 Serves as component for memory access and management.
 

Enumerations

enum  Endianess { bit_little_endian = 1 , bit_big_endian = 2 }
 Enum describing the endianess.
 

Functions

Endianess get_platform_endianess ()
 Returns the endianess of the platform. More...
 
std::string formatBits (uint64_t value)
 Format the bit pattern of a uint64_t value to a string Used for debug purposes. More...
 
a_util::result::Result convertSignalEndianess (uint64_t *signal, Endianess endianess, size_t bit_length)
 Convert the endianess of a signal by correctly swapping the byte order if required. More...
 

Detailed Description

Raw memory related functionality.

Definition in file workspace/conan/dev_essential/1.3.4/dw/stable/package/37682420cd166e229516a41c8d6a139a0b13e1e1/include/ddl/codec/bitserializer.h.

Function Documentation

◆ convertSignalEndianess()

a_util::result::Result a_util::memory::detail::convertSignalEndianess ( uint64_t *  signal,
Endianess  endianess,
size_t  bit_length 
)

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

The variable signal is a uint64_t, but the value that needs conversion might be smaller. The parameter bit_length 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]signalPointer to the variable to store the read value in.
[in]endianessParameter describing the endianess of the bitfield to convert.
[in]bit_lengthNumber of bits to read.
Returns
Returns a standard result code.

References a_util::memory::detail::convertSignalEndianess().

Referenced by a_util::memory::detail::convertSignalEndianess().

◆ formatBits()

std::string a_util::memory::detail::formatBits ( uint64_t  value)

Format the bit pattern of a uint64_t value to a string Used for debug purposes.

Parameters
[in]valueThe value to print.
Return values
Thebitstring

References a_util::memory::detail::formatBits().

Referenced by a_util::memory::detail::formatBits().