Inter-thread communication logging support.
More...
Inter-thread communication logging support.
◆ MSG_LOGGING_INITIALIZER
| #define MSG_LOGGING_INITIALIZER |
( |
| obj | ) |
|
#include <nturt/msg/logging.h>
Value: { \
.lock = Z_MUTEX_INITIALIZER((obj).lock), \
.is_logging = false, \
}
void msg_logging_sync_work(struct k_work *work)
Designated initializer for Message Logging.
- Parameters
-
| [in] | obj | Object to initialize. |
◆ 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] | chan | Message channel to log. |
| [in] | file | Path to the file to log messages to, will create the directory to the file if it does not exist. |
- Return values
-
| 0 | on success. |
| -EALREADY | if logging is already started on the channel. |
| others | Negative 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] | chan | Message channel to stop logging. |
- Return values
-
| 0 | on success. |
| -ENOTCONN | if logging is not started on the channel. |
| others | Negative error number on file operations failure. |
◆ msg_logging_sync_work()
| void msg_logging_sync_work |
( |
struct k_work * | work | ) |
|