NTURT Zephyr v0.0.1
NTURT common library for Zephyr RTOS
Loading...
Searching...
No Matches
msg.h File Reference

Inter-thread communication support. More...

#include <stddef.h>
#include <stdio.h>
#include <zephyr/logging/log.h>
#include <zephyr/sys/iterable_sections.h>
#include <zephyr/zbus/zbus.h>
#include "nturt/msg/aggregation.h"
#include "nturt/msg/interfaces/interfaces.h"
#include "nturt/msg/logging.h"
#include "nturt/sys/util.h"
+ Include dependency graph for msg.h:
+ This graph shows which files directly or indirectly include this file:

Data Structures

struct  msg_chan_data
 Message channel data. More...
 

Macros

#define MSG_LIST   MSG_SENSOR_LIST, MSG_TRACTIVE_LIST
 List of all messages.
 
#define MSG_AGG_TO_MSG_DEFINE(name, msg, init_val, period, min_separation, watermark, flag, ...)
 Define a data aggregration for aggregating into message msg . May be specified as static to limit the scope of the aggregation.
 
#define MSG_CHAN_DEFINE(list)
 Define one message channel for every message in list .
 
#define MSG_CHAN_DECLARE(list)
 Declare one message channel for every message in list .
 

Typedefs

typedef void(* msg_print_t) (const void *data)
 Print function of a message.
 
typedef const char *(* msg_csv_header_t) ()
 Function to get the CSV header of a message.
 
typedef int(* msg_csv_write_t) (char *buf, size_t len, const void *data)
 Function to write a message to a CSV format.
 

Functions

 MSG_CHAN_DECLARE (MSG_LIST)
 
bool msg_chan_is_from_msg (const struct zbus_channel *chan)
 Check if the given zbus channel is a message channel.
 
void msg_chan_print (const struct zbus_channel *chan, const void *data)
 Print a message based on the channel.
 
const char * msg_chan_csv_header (const struct zbus_channel *chan)
 Get the CSV header of a message channel.
 
int msg_chan_csv_write (const struct zbus_channel *chan, const void *data, char *buf, size_t len)
 Write a message in CSV format to a buffer based on the channel.
 
void msg_agg_publish (const void *data, void *user_data)
 Publishing function for MSG_AGG_DEFINE.
 

Detailed Description

Inter-thread communication support.

Author
quantumspawner
Version
0.0.1
Date
2025-01-20