Zephyr API Documentation  2.7.0-rc2
A Scalable Open Source RTOS
Log message v2 API

Log message API. More...

Data Structures

struct  log_msg2_desc
 
struct  log_msg2_trace_hdr
 
union  log_msg2_source
 
struct  log_msg2_hdr
 
struct  log_msg2_trace
 
struct  log_msg2_trace_ptr
 
struct  log_msg2
 
struct  log_msg2_generic_hdr
 
union  log_msg2_generic
 

Macros

#define LOG_MSG2_GENERIC_HDR
 

Functions

static uint32_t log_msg2_get_total_wlen (const struct log_msg2_desc desc)
 Get total length (in 32 bit words) of a log message. More...
 
static uint32_t log_msg2_generic_get_wlen (union mpsc_pbuf_generic *item)
 Get length of the log item. More...
 
static uint8_t log_msg2_get_domain (struct log_msg2 *msg)
 Get log message domain ID. More...
 
static uint8_t log_msg2_get_level (struct log_msg2 *msg)
 Get log message level. More...
 
static const voidlog_msg2_get_source (struct log_msg2 *msg)
 Get message source data. More...
 
static log_timestamp_t log_msg2_get_timestamp (struct log_msg2 *msg)
 Get timestamp. More...
 
static uint8_tlog_msg2_get_data (struct log_msg2 *msg, size_t *len)
 Get data buffer. More...
 
static uint8_tlog_msg2_get_package (struct log_msg2 *msg, size_t *len)
 Get string package. More...
 

Detailed Description

Log message API.

Macro Definition Documentation

◆ LOG_MSG2_GENERIC_HDR

#define LOG_MSG2_GENERIC_HDR

#include <include/logging/log_msg2.h>

Value:
uint32_t type:1
#define MPSC_PBUF_HDR
Header that must be added to the first word in each packet.
Definition: mpsc_packet.h:32

Function Documentation

◆ log_msg2_generic_get_wlen()

static uint32_t log_msg2_generic_get_wlen ( union mpsc_pbuf_generic item)
inlinestatic

#include <include/logging/log_msg2.h>

Get length of the log item.

Parameters
itemItem.
Returns
Length in 32 bit words.

◆ log_msg2_get_data()

static uint8_t * log_msg2_get_data ( struct log_msg2 msg,
size_t *  len 
)
inlinestatic

#include <include/logging/log_msg2.h>

Get data buffer.

Parameters
msglog message.
lenlocation where data length is written.
Returns
pointer to the data buffer.

◆ log_msg2_get_domain()

static uint8_t log_msg2_get_domain ( struct log_msg2 msg)
inlinestatic

#include <include/logging/log_msg2.h>

Get log message domain ID.

Parameters
msgLog message.
Returns
Domain ID

◆ log_msg2_get_level()

static uint8_t log_msg2_get_level ( struct log_msg2 msg)
inlinestatic

#include <include/logging/log_msg2.h>

Get log message level.

Parameters
msgLog message.
Returns
Log level.

◆ log_msg2_get_package()

static uint8_t * log_msg2_get_package ( struct log_msg2 msg,
size_t *  len 
)
inlinestatic

#include <include/logging/log_msg2.h>

Get string package.

Parameters
msglog message.
lenlocation where string package length is written.
Returns
pointer to the package.

◆ log_msg2_get_source()

static const void * log_msg2_get_source ( struct log_msg2 msg)
inlinestatic

#include <include/logging/log_msg2.h>

Get message source data.

Parameters
msgLog message.
Returns
Pointer to the source data.

◆ log_msg2_get_timestamp()

static log_timestamp_t log_msg2_get_timestamp ( struct log_msg2 msg)
inlinestatic

#include <include/logging/log_msg2.h>

Get timestamp.

Parameters
msgLog message.
Returns
Timestamp.

◆ log_msg2_get_total_wlen()

static uint32_t log_msg2_get_total_wlen ( const struct log_msg2_desc  desc)
inlinestatic

#include <include/logging/log_msg2.h>

Get total length (in 32 bit words) of a log message.

Parameters
descLog message descriptor.
Returns
Length.