Zephyr API 3.6.99
Loading...
Searching...
No Matches
log_frontend_stmesp_demux.h File Reference

Go to the source code of this file.

Data Structures

struct  log_frontend_stmesp_demux_log_header
 Logging message header. More...
 
union  log_frontend_stmesp_demux_header
 Union for writing raw data to the logging message header. More...
 
struct  log_frontend_stmesp_demux_packet_generic
 Generic STP demux packet. More...
 
struct  log_frontend_stmesp_demux_log
 Packet with logging message. More...
 
struct  log_frontend_stmesp_demux_trace_point
 Packet with trace point. More...
 
struct  log_frontend_stmesp_demux_hw_event
 Packet with HW event. More...
 
union  log_frontend_stmesp_demux_packet
 Union of all packet types. More...
 
struct  log_frontend_stmesp_demux_config
 Demultiplexer configuration. More...
 

Macros

#define LOG_FRONTEND_STMESP_DEMUX_MAJOR_BITS   3
 Bits used to store major index.
 
#define LOG_FRONTEND_STMESP_DEMUX_LEVEL_BITS   3
 Bits used to store severity level.
 
#define LOG_FRONTEND_STMESP_DEMUX_TLENGTH_BITS   16
 Bits used to store total length.
 
#define LOG_FRONTEND_STMESP_DEMUX_PLENGTH_BITS   10
 Bits used to store package length.
 
#define LOG_FRONTEND_STMESP_DEMUX_MAJOR_MAX   BIT(LOG_FRONTEND_STMESP_DEMUX_MAJOR_BITS)
 Maximum number of supported majors.
 
#define LOG_FRONTEND_STMESP_DEMUX_TYPE_LOG   0
 Log message type.
 
#define LOG_FRONTEND_STMESP_DEMUX_TYPE_TRACE_POINT   1
 Trace point message type.
 
#define LOG_FRONTEND_STMESP_DEMUX_TYPE_HW_EVENT   2
 HW event message type.
 

Functions

int log_frontend_stmesp_demux_init (const struct log_frontend_stmesp_demux_config *config)
 Initialize the demultiplexer.
 
void log_frontend_stmesp_demux_major (uint16_t id)
 Indicate major opcode in the STPv2 stream.
 
void log_frontend_stmesp_demux_channel (uint16_t id)
 Indicate channel opcode in the STPv2 stream.
 
int log_frontend_stmesp_demux_packet_start (uint32_t *data, uint64_t *ts)
 Indicate detected packet start (DMTS).
 
void log_frontend_stmesp_demux_timestamp (uint64_t ts)
 Indicate timestamp.
 
void log_frontend_stmesp_demux_data (uint8_t *data, size_t len)
 Indicate data.
 
void log_frontend_stmesp_demux_packet_end (void)
 Indicate packet end (Flag).
 
uint32_t log_frontend_stmesp_demux_get_dropped (void)
 Get number of dropped messages and reset the counter.
 
union log_frontend_stmesp_demux_packet log_frontend_stmesp_demux_claim (void)
 Claim packet.
 
void log_frontend_stmesp_demux_free (union log_frontend_stmesp_demux_packet packet)
 Free previously claimed packet.
 
bool log_frontend_stmesp_demux_is_idle (void)
 Check if there are any started but not completed log messages.
 
void log_frontend_stmesp_demux_reset (void)
 Close any opened messages and mark them as invalid.
 
int log_frontend_stmesp_demux_max_utilization (void)
 Get maximum buffer utilization.