Zephyr API Documentation  2.7.0-rc2
A Scalable Open Source RTOS
bt_mesh_model_op Struct Reference

#include <access.h>

Data Fields

const uint32_t opcode
 
const ssize_t len
 
int(*const func )(struct bt_mesh_model *model, struct bt_mesh_msg_ctx *ctx, struct net_buf_simple *buf)
 Handler function for this opcode. More...
 

Detailed Description

Model opcode handler.

Field Documentation

◆ func

int(*const bt_mesh_model_op::func) (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: