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

ISO Channel operations structure. More...

#include <iso.h>

Data Fields

void(* connected )(struct bt_iso_chan *chan)
 Channel connected callback.
 
void(* disconnected )(struct bt_iso_chan *chan, uint8_t reason)
 Channel disconnected callback.
 
struct net_buf *(* alloc_buf )(struct bt_iso_chan *chan)
 Channel alloc_buf callback.
 
void(* recv )(struct bt_iso_chan *chan, const struct bt_iso_recv_info *info, struct net_buf *buf)
 Channel recv callback.
 
void(* sent )(struct bt_iso_chan *chan)
 Channel sent callback.
 

Detailed Description

ISO Channel operations structure.

Field Documentation

◆ alloc_buf

struct net_buf *(* bt_iso_chan_ops::alloc_buf) (struct bt_iso_chan *chan)

Channel alloc_buf callback.

If this callback is provided the channel will use it to allocate buffers to store incoming data.

Parameters
chanThe channel requesting a buffer.
Returns
Allocated buffer.

◆ connected

void(* bt_iso_chan_ops::connected) (struct bt_iso_chan *chan)

Channel connected callback.

If this callback is provided it will be called whenever the connection completes.

For a peripheral, the QoS values (see bt_iso_chan_io_qos) are set when this is called. The peripheral does not have any information about the RTN though.

Parameters
chanThe channel that has been connected

◆ disconnected

void(* bt_iso_chan_ops::disconnected) (struct bt_iso_chan *chan, uint8_t reason)

Channel disconnected callback.

If this callback is provided it will be called whenever the channel is disconnected, including when a connection gets rejected or when setting security fails.

Parameters
chanThe channel that has been Disconnected
reasonBT_HCI_ERR_* reason for the disconnection.

◆ recv

void(* bt_iso_chan_ops::recv) (struct bt_iso_chan *chan, const struct bt_iso_recv_info *info, struct net_buf *buf)

Channel recv callback.

Parameters
chanThe channel receiving data.
bufBuffer containing incoming data.
infoPointer to the metadata for the buffer. The lifetime of the pointer is linked to the lifetime of the net_buf. Metadata such as sequence number and timestamp can be provided by the bluetooth controller.

◆ sent

void(* bt_iso_chan_ops::sent) (struct bt_iso_chan *chan)

Channel sent callback.

This callback will be called once the controller marks the SDU as completed. When the controller does so is implementation dependent. It could be after the SDU is enqueued for transmission, or after it is sent on air or flushed.

Parameters
chanThe channel which has sent data.

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