Zephyr API Documentation 4.0.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
zbus_channel Struct Reference

Type used to represent a channel. More...

#include <zbus.h>

Data Fields

const char * name
 Channel name.
 
uint32_t id
 Unique numeric channel identifier.
 
void * message
 Message reference.
 
size_t message_size
 Message size.
 
void * user_data
 User data available to extend zbus features.
 
bool(* validator )(const void *msg, size_t msg_size)
 Message validator.
 
struct zbus_channel_datadata
 Mutable channel data struct.
 

Detailed Description

Type used to represent a channel.

Every channel has a zbus_channel structure associated used to control the channel access and usage.

Field Documentation

◆ data

struct zbus_channel_data* zbus_channel::data

Mutable channel data struct.

◆ id

uint32_t zbus_channel::id

Unique numeric channel identifier.

◆ message

void* zbus_channel::message

Message reference.

Represents the message's reference that points to the actual shared memory region.

◆ message_size

size_t zbus_channel::message_size

Message size.

Represents the channel's message size.

◆ name

const char* zbus_channel::name

Channel name.

◆ user_data

void* zbus_channel::user_data

User data available to extend zbus features.

The channel must be claimed before using this field.

◆ validator

bool(* zbus_channel::validator) (const void *msg, size_t msg_size)

Message validator.

Stores the reference to the function to check the message validity before actually performing the publishing. No invalid messages can be published. Every message is valid when this field is empty.


The documentation for this struct was generated from the following file: