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

Health Client Model Context. More...

#include <health_cli.h>

Data Fields

const struct bt_mesh_modelmodel
 Composition data model entry pointer.
 
struct bt_mesh_model_pub pub
 Publication structure instance.
 
struct net_buf_simple pub_buf
 Publication buffer.
 
uint8_t pub_data [BT_MESH_MODEL_BUF_LEN(BT_MESH_MODEL_OP_2(0x80, 0x32), 3)]
 Publication data.
 
void(* period_status )(struct bt_mesh_health_cli *cli, uint16_t addr, uint8_t divisor)
 Optional callback for Health Period Status messages.
 
void(* attention_status )(struct bt_mesh_health_cli *cli, uint16_t addr, uint8_t attention)
 Optional callback for Health Attention Status messages.
 
void(* fault_status )(struct bt_mesh_health_cli *cli, uint16_t addr, uint8_t test_id, uint16_t cid, uint8_t *faults, size_t fault_count)
 Optional callback for Health Fault Status messages.
 
void(* current_status )(struct bt_mesh_health_cli *cli, uint16_t addr, uint8_t test_id, uint16_t cid, uint8_t *faults, size_t fault_count)
 Optional callback for Health Current Status messages.
 
int(* update )(struct bt_mesh_health_cli *cli, struct net_buf_simple *pub_buf)
 Optional callback for updating the message to be sent as periodic publication.
 
struct bt_mesh_msg_ack_ctx ack_ctx
 

Detailed Description

Health Client Model Context.

Field Documentation

◆ ack_ctx

struct bt_mesh_msg_ack_ctx bt_mesh_health_cli::ack_ctx

◆ attention_status

void(* bt_mesh_health_cli::attention_status) (struct bt_mesh_health_cli *cli, uint16_t addr, uint8_t attention)

Optional callback for Health Attention Status messages.

Handles received Health Attention Status messages from a Health server. The attention param represents the current attention value.

Parameters
cliHealth client that received the status message.
addrAddress of the sender.
attentionCurrent attention value.

◆ current_status

void(* bt_mesh_health_cli::current_status) (struct bt_mesh_health_cli *cli, uint16_t addr, uint8_t test_id, uint16_t cid, uint8_t *faults, size_t fault_count)

Optional callback for Health Current Status messages.

Handles received Health Current Status messages from a Health server. The fault array represents all faults that are currently present in the server's element.

See also
Health faults
Parameters
cliHealth client that received the status message.
addrAddress of the sender.
test_idIdentifier of a most recently performed test.
cidCompany Identifier of the node.
faultsArray of faults.
fault_countNumber of faults in the fault array.

◆ fault_status

void(* bt_mesh_health_cli::fault_status) (struct bt_mesh_health_cli *cli, uint16_t addr, uint8_t test_id, uint16_t cid, uint8_t *faults, size_t fault_count)

Optional callback for Health Fault Status messages.

Handles received Health Fault Status messages from a Health server. The fault array represents all faults that are currently present in the server's element.

See also
Health faults
Parameters
cliHealth client that received the status message.
addrAddress of the sender.
test_idIdentifier of a most recently performed test.
cidCompany Identifier of the node.
faultsArray of faults.
fault_countNumber of faults in the fault array.

◆ model

const struct bt_mesh_model* bt_mesh_health_cli::model

Composition data model entry pointer.

◆ period_status

void(* bt_mesh_health_cli::period_status) (struct bt_mesh_health_cli *cli, uint16_t addr, uint8_t divisor)

Optional callback for Health Period Status messages.

Handles received Health Period Status messages from a Health server. The divisor param represents the period divisor value.

Parameters
cliHealth client that received the status message.
addrAddress of the sender.
divisorHealth Period Divisor value.

◆ pub

struct bt_mesh_model_pub bt_mesh_health_cli::pub

Publication structure instance.

◆ pub_buf

struct net_buf_simple bt_mesh_health_cli::pub_buf

Publication buffer.

◆ pub_data

uint8_t bt_mesh_health_cli::pub_data[BT_MESH_MODEL_BUF_LEN(BT_MESH_MODEL_OP_2(0x80, 0x32), 3)]

Publication data.

◆ update

int(* bt_mesh_health_cli::update) (struct bt_mesh_health_cli *cli, struct net_buf_simple *pub_buf)

Optional callback for updating the message to be sent as periodic publication.

This callback is called before sending the periodic publication message. The callback can be used to update the message to be sent.

If this callback is not implemented, periodic publication can still be enabled, but no messages will be sent.

Parameters
cliHealth client that is sending the periodic publication message.
pub_bufPublication message buffer to be updated.
Returns
0 if pub_buf is updated successfully, or (negative) error code on failure. The message won't be sent if an error is returned.

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