![]() |
CppSerdes
1.0
A serialization/deserialization library designed with embedded systems in mind
|
defines printhex() and printbin() funtions which print arrays or values in hexidecimal or binary More...
#include <stdint.h>
#include <cstddef>
#include <stdio.h>
#include <type_traits>
#include <inttypes.h>
Go to the source code of this file.
Namespaces | |
serdes | |
CppSerdes library namespace. | |
Functions | |
void | serdes::printhex (const uint8_t data, const bool add_newline=true) |
prints uint8_t value in hex format More... | |
void | serdes::printhex (const uint16_t data, const bool add_newline=true) |
prints uint16_t value in hex format More... | |
void | serdes::printhex (const uint32_t data, const bool add_newline=true) |
prints uint32_t value in hex format More... | |
void | serdes::printhex (const uint64_t data, const bool add_newline=true) |
prints uint64_t value in hex format More... | |
void | serdes::printhex (const bool data, const bool add_newline=true) |
prints bool value in hex format More... | |
template<typename T = void, typename std::enable_if< std::is_signed< T >::valueBITCPY_INT128_CONDITIONAL_DEFINE(||std::is_same< T, __int128_t >::value), T >::type * = nullptr> | |
void | serdes::printhex (const T data, const bool add_newline=true) |
prints signed value in hex format More... | |
template<bool use_brackets = true, typename T = void, size_t N = 0u> | |
void | serdes::printhex (const T(&data)[N], const bool add_newline=true) |
prints an array in hex format More... | |
template<bool use_brackets = true, typename T = void, size_t N = 0u> | |
void | serdes::printbin (const T(&data)[N], const bool add_newline=true) |
prints an array in binary format More... | |
template<typename T , typename std::enable_if<!std::is_array< T >::value &&!std::is_same< T, bool >::value, T >::type * = nullptr> | |
void | serdes::printbin (const T data, const bool add_newline=true) |
prints a non-array non-bool value in binary format More... | |
void | serdes::printbin (const bool data, const bool add_newline=true) |
prints a bool value in binary format More... | |
defines printhex() and printbin() funtions which print arrays or values in hexidecimal or binary