|
Dev Essential
|
Go to the source code of this file.
Classes | |
| class | a_util::memory::detail::ConverterBase< T > |
| class | a_util::memory::detail::Converter< T, 0, 0 > |
| Partially specialized class for Unsigned Integers. More... | |
| class | a_util::memory::detail::Converter< T, 1, 0 > |
| Partially specialized class for Signed Integers. More... | |
| class | a_util::memory::detail::Converter< T, 1, 1 > |
| Specialized class for Floats (Floats are always signed!) More... | |
| class | a_util::memory::BitSerializer |
| Bit Serializer Class. More... | |
Namespaces | |
| namespace | a_util |
| Serves as the root component, with common functionality documented in core functionality. | |
| namespace | a_util::memory |
| Serves as component for memory access and management. | |
Enumerations | |
| enum | a_util::memory::Endianess { bit_little_endian = 1 , bit_big_endian = 2 } |
| Enum describing the endianess. | |
Functions | |
| Endianess | a_util::memory::get_platform_endianess () |
| std::string | a_util::memory::detail::formatBits (uint64_t value) |
| a_util::result::Result | a_util::memory::detail::convertSignalEndianess (uint64_t *signal, Endianess endianess, size_t bit_length) |
Raw memory related functionality
Copyright 2025 Digitalwerk GmbH. 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/.
| 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. |
| 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 |