NTURT Zephyr v0.0.1
NTURT common library for Zephyr RTOS
Loading...
Searching...
No Matches
Message Logging

Inter-thread communication logging support. More...

+ Collaboration diagram for Message Logging:

Data Structures

struct  msg_logging
 Message logging support. More...
 

Macros

#define MSG_LOGGING_INITIALIZER(obj)
 Designated initializer for Message Logging.
 

Functions

int msg_chan_logging_start (const struct zbus_channel *chan, const char *file)
 Start logging messages on a channel to a file.
 
int msg_chan_logging_stop (const struct zbus_channel *chan)
 Stop logging messages on a channel.
 
void msg_logging_sync_work (struct k_work *work)
 

Detailed Description

Inter-thread communication logging support.

Macro Definition Documentation

◆ MSG_LOGGING_INITIALIZER

#define MSG_LOGGING_INITIALIZER ( obj)

#include <nturt/msg/logging.h>

Value:
{ \
.lock = Z_MUTEX_INITIALIZER((obj).lock), \
.is_logging = false, \
.sync_dwork = Z_WORK_DELAYABLE_INITIALIZER(msg_logging_sync_work), \
}
void msg_logging_sync_work(struct k_work *work)

Designated initializer for Message Logging.

Parameters
[in]objObject to initialize.

Function Documentation

◆ msg_chan_logging_start()

int msg_chan_logging_start ( const struct zbus_channel * chan,
const char * file )

#include <nturt/msg/logging.h>

Start logging messages on a channel to a file.

Parameters
[in]chanMessage channel to log.
[in]filePath to the file to log messages to, will create the directory to the file if it does not exist.
Return values
0on success.
-EALREADYif logging is already started on the channel.
othersNegative error number on file operations failure.

◆ msg_chan_logging_stop()

int msg_chan_logging_stop ( const struct zbus_channel * chan)

#include <nturt/msg/logging.h>

Stop logging messages on a channel.

Parameters
[in]chanMessage channel to stop logging.
Return values
0on success.
-ENOTCONNif logging is not started on the channel.
othersNegative error number on file operations failure.

◆ msg_logging_sync_work()

void msg_logging_sync_work ( struct k_work * work)

#include <nturt/msg/logging.h>