Zephyr API Documentation 4.0.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
health_cli.h
Go to the documentation of this file.
1
5/*
6 * Copyright (c) 2017 Intel Corporation
7 *
8 * SPDX-License-Identifier: Apache-2.0
9 */
10#ifndef ZEPHYR_INCLUDE_BLUETOOTH_MESH_HEALTH_CLI_H_
11#define ZEPHYR_INCLUDE_BLUETOOTH_MESH_HEALTH_CLI_H_
12
14
22#ifdef __cplusplus
23extern "C" {
24#endif
25
29 const struct bt_mesh_model *model;
30
33
36
39
49 void (*period_status)(struct bt_mesh_health_cli *cli, uint16_t addr,
50 uint8_t divisor);
51
61 void (*attention_status)(struct bt_mesh_health_cli *cli, uint16_t addr,
62 uint8_t attention);
63
79 void (*fault_status)(struct bt_mesh_health_cli *cli, uint16_t addr,
80 uint8_t test_id, uint16_t cid, uint8_t *faults,
81 size_t fault_count);
82
98 void (*current_status)(struct bt_mesh_health_cli *cli, uint16_t addr,
99 uint8_t test_id, uint16_t cid, uint8_t *faults,
100 size_t fault_count);
101
116 int (*update)(struct bt_mesh_health_cli *cli, struct net_buf_simple *pub_buf);
117
118 /* Internal parameters for tracking message responses. */
120};
121
127#define BT_MESH_MODEL_HEALTH_CLI(cli_data) \
128 BT_MESH_MODEL_CB(BT_MESH_MODEL_ID_HEALTH_CLI, bt_mesh_health_cli_op, \
129 &(cli_data)->pub, cli_data, &bt_mesh_health_cli_cb)
130
154 uint16_t cid, uint8_t *test_id, uint8_t *faults,
155 size_t *fault_count);
156
180 uint16_t cid, uint8_t *test_id, uint8_t *faults,
181 size_t *fault_count);
182
195 struct bt_mesh_msg_ctx *ctx, uint16_t cid);
196
217 uint16_t cid, uint8_t test_id, uint8_t *faults,
218 size_t *fault_count);
219
231 uint16_t cid, uint8_t test_id);
232
258 uint8_t *divisor);
259
286 uint8_t divisor, uint8_t *updated_divisor);
287
300 uint8_t divisor);
301
319 uint8_t *attention);
320
340 uint8_t attention, uint8_t *updated_attention);
341
352 struct bt_mesh_msg_ctx *ctx, uint8_t attention);
353
359
365
367extern const struct bt_mesh_model_op bt_mesh_health_cli_op[];
368extern const struct bt_mesh_model_cb bt_mesh_health_cli_cb;
371#ifdef __cplusplus
372}
373#endif
374
379#endif /* ZEPHYR_INCLUDE_BLUETOOTH_MESH_HEALTH_CLI_H_ */
#define BT_MESH_MODEL_OP_2(b0, b1)
Definition access.h:390
int bt_mesh_health_cli_fault_test(struct bt_mesh_health_cli *cli, struct bt_mesh_msg_ctx *ctx, uint16_t cid, uint8_t test_id, uint8_t *faults, size_t *fault_count)
Invoke a self-test procedure for the given Company ID.
int bt_mesh_health_cli_attention_set(struct bt_mesh_health_cli *cli, struct bt_mesh_msg_ctx *ctx, uint8_t attention, uint8_t *updated_attention)
Set the attention timer.
int bt_mesh_health_cli_period_get(struct bt_mesh_health_cli *cli, struct bt_mesh_msg_ctx *ctx, uint8_t *divisor)
Get the target node's Health fast period divisor.
int bt_mesh_health_cli_fault_get(struct bt_mesh_health_cli *cli, struct bt_mesh_msg_ctx *ctx, uint16_t cid, uint8_t *test_id, uint8_t *faults, size_t *fault_count)
Get the registered fault state for the given Company ID.
int bt_mesh_health_cli_period_set(struct bt_mesh_health_cli *cli, struct bt_mesh_msg_ctx *ctx, uint8_t divisor, uint8_t *updated_divisor)
Set the target node's Health fast period divisor.
int bt_mesh_health_cli_attention_set_unack(struct bt_mesh_health_cli *cli, struct bt_mesh_msg_ctx *ctx, uint8_t attention)
Set the attention timer (unacknowledged).
int bt_mesh_health_cli_period_set_unack(struct bt_mesh_health_cli *cli, struct bt_mesh_msg_ctx *ctx, uint8_t divisor)
Set the target node's Health fast period divisor (unacknowledged).
int bt_mesh_health_cli_fault_clear(struct bt_mesh_health_cli *cli, struct bt_mesh_msg_ctx *ctx, uint16_t cid, uint8_t *test_id, uint8_t *faults, size_t *fault_count)
Clear the registered faults for the given Company ID.
int bt_mesh_health_cli_fault_test_unack(struct bt_mesh_health_cli *cli, struct bt_mesh_msg_ctx *ctx, uint16_t cid, uint8_t test_id)
Invoke a self-test procedure for the given Company ID (unacked).
int32_t bt_mesh_health_cli_timeout_get(void)
Get the current transmission timeout value.
int bt_mesh_health_cli_attention_get(struct bt_mesh_health_cli *cli, struct bt_mesh_msg_ctx *ctx, uint8_t *attention)
Get the current attention timer value.
void bt_mesh_health_cli_timeout_set(int32_t timeout)
Set the transmission timeout value.
int bt_mesh_health_cli_fault_clear_unack(struct bt_mesh_health_cli *cli, struct bt_mesh_msg_ctx *ctx, uint16_t cid)
Clear the registered faults for the given Company ID (unacked).
#define BT_MESH_MODEL_BUF_LEN(_op, _payload_len)
Helper for model message buffer length.
Definition msg.h:50
Bluetooth Mesh Profile APIs.
__INT32_TYPE__ int32_t
Definition stdint.h:74
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
__UINT16_TYPE__ uint16_t
Definition stdint.h:89
Health Client Model Context.
Definition health_cli.h:27
uint8_t pub_data[BT_MESH_MODEL_BUF_LEN(BT_MESH_MODEL_OP_2(0x80, 0x32), 3)]
Publication data.
Definition health_cli.h:38
void(* period_status)(struct bt_mesh_health_cli *cli, uint16_t addr, uint8_t divisor)
Optional callback for Health Period Status messages.
Definition health_cli.h:49
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.
Definition health_cli.h:79
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.
Definition health_cli.h:98
struct net_buf_simple pub_buf
Publication buffer.
Definition health_cli.h:35
struct bt_mesh_msg_ack_ctx ack_ctx
Definition health_cli.h:119
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.
Definition health_cli.h:116
struct bt_mesh_model_pub pub
Publication structure instance.
Definition health_cli.h:32
const struct bt_mesh_model * model
Composition data model entry pointer.
Definition health_cli.h:29
void(* attention_status)(struct bt_mesh_health_cli *cli, uint16_t addr, uint8_t attention)
Optional callback for Health Attention Status messages.
Definition health_cli.h:61
Model callback functions.
Definition access.h:813
Model opcode handler.
Definition access.h:363
Model publication context.
Definition access.h:708
Abstraction that describes a Mesh Model instance.
Definition access.h:891
Acknowledged message context for tracking the status of model messages pending a response.
Definition msg.h:172
Message sending context.
Definition msg.h:76
Simple network buffer representation.
Definition net_buf.h:89