ADTF
3.18.4
|
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... | |
Raw memory related functionality.
Copyright @ 2023 VW Group. All rights reserved. This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/.
Definition in file workspace/conan/dev_essential/1.3.4/dw/stable/package/37682420cd166e229516a41c8d6a139a0b13e1e1/include/ddl/codec/bitserializer.h.
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.
[in,out] | signal | Pointer to the variable to store the read value in. |
[in] | endianess | Parameter describing the endianess of the bitfield to convert. |
[in] | bit_length | Number of bits to read. |
References a_util::memory::detail::convertSignalEndianess().
Referenced by a_util::memory::detail::convertSignalEndianess().
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.
[in] | value | The value to print. |
The | bitstring |
References a_util::memory::detail::formatBits().
Referenced by a_util::memory::detail::formatBits().