Zephyr Project API 4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
mpipe_bin.h
Go to the documentation of this file.
1/*
2 * Copyright 2025-2026 NXP
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
12
13#ifndef ZEPHYR_INCLUDE_MPIPE_MPIPE_BIN_H_
14#define ZEPHYR_INCLUDE_MPIPE_MPIPE_BIN_H_
15
37
38#include <stdint.h>
39
40#include <zephyr/sys/dlist.h>
41#include <zephyr/zbus/zbus.h>
42
45
54struct mpipe_bin {
101
103 /* Bus channel mutable runtime state: observer bookkeeping, lock, counters. */
104 struct zbus_channel_data chan_data;
105 /* Bus channel message buffer: holds the last published mpipe_message. */
106 struct mpipe_message chan_msg;
108};
109
121int mpipe_bin_init(struct mpipe_bin *bin, uint8_t id);
122
142 void *user_data);
143
163int mpipe_bin_add(struct mpipe_bin *bin, struct mpipe_element *element, ...);
164
180
182
183#endif /* ZEPHYR_INCLUDE_MPIPE_MPIPE_BIN_H_ */
Header file for the doubly-linked list API.
struct _dnode sys_dlist_t
Doubly-linked list structure.
Definition dlist.h:55
int mpipe_bin_add(struct mpipe_bin *bin, struct mpipe_element *element,...)
Add elements to a bin.
int mpipe_bin_change_state_func(struct mpipe_element *element, enum mpipe_state_change transition)
Bin state change function.
int mpipe_bin_set_bus_validator(struct mpipe_bin *bin, zbus_validator bus_validator, void *user_data)
Install a validator and user data on the bin's bus.
int mpipe_bin_init(struct mpipe_bin *bin, uint8_t id)
Initialize a bin.
mpipe_state_change
enum mpipe_state_change
Definition mpipe_element.h:141
bool(* zbus_validator)(const void *msg, size_t msg_size)
Check validity of message before publishing.
Definition zbus.h:91
Element: the unit a pipeline is built from.
Bus message: what an element reports to the application.
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
Bin structure.
Definition mpipe_bin.h:54
sys_dlist_t children
List of children elements in the bin.
Definition mpipe_bin.h:60
int children_num
Number of children in the bin.
Definition mpipe_bin.h:58
struct zbus_runtime_channel bus
The bin's message bus.
Definition mpipe_bin.h:100
struct mpipe_element element
Base element structure.
Definition mpipe_bin.h:56
Element base class.
Definition mpipe_element.h:165
Message structure carrying type and origin of the message.
Definition mpipe_message.h:109
Type used to represent a channel mutable data.
Definition zbus.h:33
Type used to represent a runtime channel.
Definition zbus.h:136