Zephyr Project API 4.0.0
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
bt_mesh_model_op Struct Reference

Model opcode handler. More...

#include <access.h>

Data Fields

const uint32_t opcode
 OpCode encoded using the BT_MESH_MODEL_OP_* macros.
 
const ssize_t len
 Message length.
 
int(*const func )(const struct bt_mesh_model *model, struct bt_mesh_msg_ctx *ctx, struct net_buf_simple *buf)
 Handler function for this opcode.
 

Detailed Description

Model opcode handler.

Field Documentation

◆ func

int(*const bt_mesh_model_op::func) (const struct bt_mesh_model *model, struct bt_mesh_msg_ctx *ctx, struct net_buf_simple *buf)

Handler function for this opcode.

Parameters
modelModel instance receiving the message.
ctxMessage context for the message.
bufMessage buffer containing the message payload, not including the opcode.
Returns
Zero on success or (negative) error code otherwise.

◆ len

const ssize_t bt_mesh_model_op::len

Message length.

If the message has variable length then this value indicates minimum message length and should be positive. Handler function should verify precise length based on the contents of the message. If the message has fixed length then this value should be negative. Use BT_MESH_LEN_* macros when defining this value.

◆ opcode

const uint32_t bt_mesh_model_op::opcode

OpCode encoded using the BT_MESH_MODEL_OP_* macros.


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