#include <metadata.h>
Public Member Functions | |
constexpr | GenericMetadata (T log_level, T module, T flags, T line) |
constexpr | GenericMetadata (T value) |
constexpr T | level () const |
The log level of this message. | |
constexpr T | line_number () const |
constexpr T | flags () const |
The flags provided to the log call. | |
constexpr T | module () const |
constexpr T | value () const |
The underlying packed metadata. | |
Static Public Member Functions | |
template<T log_level = 0, T module = 0, T flags = 0, T line = 0> | |
static constexpr GenericMetadata | Set () |
GenericMetadata
facilitates the creation and interpretation of packed log metadata payloads. The GenericMetadata
class allows flags, log level, line number, and a module identifier to be packed into bit fields of configurable size.
Typically, the Metadata
alias should be used instead.
|
inlineconstexpr |
Only use this constructor for creating metadata from runtime values. This constructor is unable to warn at compilation when values will not fit in the specified bit field widths.
|
inlineconstexpr |
The line number of the log call. The first line in a file is 1. If the line number is 0, it was too large to be stored.
|
inlineconstexpr |
The 16-bit tokenized version of the module name (
embed:rst:inline :c:macro:`PW_LOG_MODULE_NAME`
).