Zephyr Project API  3.2.0
A Scalable Open Source RTOS
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
20#ifdef __cplusplus
21extern "C" {
22#endif
23
28
31
34
37
47 void (*period_status)(struct bt_mesh_health_cli *cli, uint16_t addr,
48 uint8_t divisor);
49
59 void (*attention_status)(struct bt_mesh_health_cli *cli, uint16_t addr,
60 uint8_t attention);
61
77 void (*fault_status)(struct bt_mesh_health_cli *cli, uint16_t addr,
78 uint8_t test_id, uint16_t cid, uint8_t *faults,
79 size_t fault_count);
80
96 void (*current_status)(struct bt_mesh_health_cli *cli, uint16_t addr,
97 uint8_t test_id, uint16_t cid, uint8_t *faults,
98 size_t fault_count);
99
100 /* Internal parameters for tracking message responses. */
102};
103
109#define BT_MESH_MODEL_HEALTH_CLI(cli_data) \
110 BT_MESH_MODEL_CB(BT_MESH_MODEL_ID_HEALTH_CLI, bt_mesh_health_cli_op, \
111 &(cli_data)->pub, cli_data, &bt_mesh_health_cli_cb)
112
119__deprecated int bt_mesh_health_cli_set(struct bt_mesh_model *model);
120
142__deprecated int bt_mesh_health_fault_get(uint16_t addr, uint16_t app_idx, uint16_t cid,
143 uint8_t *test_id, uint8_t *faults, size_t *fault_count);
144
166__deprecated int bt_mesh_health_fault_clear(uint16_t addr, uint16_t app_idx, uint16_t cid,
167 uint8_t *test_id, uint8_t *faults, size_t *fault_count);
168
179__deprecated int bt_mesh_health_fault_clear_unack(uint16_t addr, uint16_t app_idx, uint16_t cid);
180
199__deprecated int bt_mesh_health_fault_test(uint16_t addr, uint16_t app_idx, uint16_t cid,
200 uint8_t test_id, uint8_t *faults, size_t *fault_count);
201
211__deprecated int bt_mesh_health_fault_test_unack(uint16_t addr, uint16_t app_idx, uint16_t cid,
212 uint8_t test_id);
213
237__deprecated int bt_mesh_health_period_get(uint16_t addr, uint16_t app_idx, uint8_t *divisor);
238
263__deprecated int bt_mesh_health_period_set(uint16_t addr, uint16_t app_idx, uint8_t divisor,
264 uint8_t *updated_divisor);
265
276__deprecated int bt_mesh_health_period_set_unack(uint16_t addr, uint16_t app_idx, uint8_t divisor);
277
293__deprecated int bt_mesh_health_attention_get(uint16_t addr, uint16_t app_idx, uint8_t *attention);
294
312__deprecated int bt_mesh_health_attention_set(uint16_t addr, uint16_t app_idx, uint8_t attention,
313 uint8_t *updated_attention);
314
324 uint8_t attention);
325
349 uint16_t cid, uint8_t *test_id, uint8_t *faults,
350 size_t *fault_count);
351
375 uint16_t cid, uint8_t *test_id, uint8_t *faults,
376 size_t *fault_count);
377
390 struct bt_mesh_msg_ctx *ctx, uint16_t cid);
391
412 uint16_t cid, uint8_t test_id, uint8_t *faults,
413 size_t *fault_count);
414
426 uint16_t cid, uint8_t test_id);
427
453 uint8_t *divisor);
454
481 uint8_t divisor, uint8_t *updated_divisor);
482
495 uint8_t divisor);
496
514 uint8_t *attention);
515
535 uint8_t attention, uint8_t *updated_attention);
536
547 struct bt_mesh_msg_ctx *ctx, uint8_t attention);
548
554
560
562extern const struct bt_mesh_model_op bt_mesh_health_cli_op[];
563extern const struct bt_mesh_model_cb bt_mesh_health_cli_cb;
566#ifdef __cplusplus
567}
568#endif
569
574#endif /* ZEPHYR_INCLUDE_BLUETOOTH_MESH_HEALTH_CLI_H_ */
ZTEST_BMEM int timeout
Definition: main.c:31
#define BT_MESH_MODEL_OP_2(b0, b1)
Definition: access.h:214
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_period_set(uint16_t addr, uint16_t app_idx, uint8_t divisor, uint8_t *updated_divisor)
Set 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_fault_get(uint16_t addr, uint16_t app_idx, 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_fault_clear_unack(uint16_t addr, uint16_t app_idx, uint16_t cid)
Clear the registered faults for the given Company ID (unacked).
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).
int bt_mesh_health_attention_set(uint16_t addr, uint16_t app_idx, uint8_t attention, uint8_t *updated_attention)
Set the attention timer.
int32_t bt_mesh_health_cli_timeout_get(void)
Get the current transmission timeout value.
int bt_mesh_health_period_set_unack(uint16_t addr, uint16_t app_idx, uint8_t divisor)
Set the target node's Health fast period divisor (unacknowledged).
int bt_mesh_health_cli_set(struct bt_mesh_model *model)
Set Health client model instance to use for communication.
int bt_mesh_health_attention_get(uint16_t addr, uint16_t app_idx, uint8_t *attention)
Get the current attention timer value.
int bt_mesh_health_period_get(uint16_t addr, uint16_t app_idx, uint8_t *divisor)
Get the target node's Health fast period divisor.
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.
int bt_mesh_health_fault_test_unack(uint16_t addr, uint16_t app_idx, uint16_t cid, uint8_t test_id)
Invoke a self-test procedure for the given Company ID (unacked).
int bt_mesh_health_attention_set_unack(uint16_t addr, uint16_t app_idx, uint8_t attention)
Set the attention timer (unacknowledged).
void bt_mesh_health_cli_timeout_set(int32_t timeout)
Set the transmission timeout value.
int bt_mesh_health_fault_test(uint16_t addr, uint16_t app_idx, 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_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).
int bt_mesh_health_fault_clear(uint16_t addr, uint16_t app_idx, uint16_t cid, uint8_t *test_id, uint8_t *faults, size_t *fault_count)
Clear the registered faults for the given Company ID.
#define BT_MESH_MODEL_BUF_LEN(_op, _payload_len)
Helper for model message buffer length.
Definition: msg.h:48
__INT32_TYPE__ int32_t
Definition: stdint.h:74
__UINT8_TYPE__ uint8_t
Definition: stdint.h:88
__UINT16_TYPE__ uint16_t
Definition: stdint.h:89
Definition: health_cli.h:25
uint8_t pub_data[BT_MESH_MODEL_BUF_LEN(BT_MESH_MODEL_OP_2(0x80, 0x32), 3)]
Definition: health_cli.h:36
struct bt_mesh_model * model
Definition: health_cli.h:27
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:47
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:77
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:96
struct net_buf_simple pub_buf
Definition: health_cli.h:33
struct bt_mesh_msg_ack_ctx ack_ctx
Definition: health_cli.h:101
struct bt_mesh_model_pub pub
Definition: health_cli.h:30
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:59
Definition: access.h:451
Definition: access.h:187
Definition: access.h:384
Definition: access.h:519
Definition: msg.h:113
Definition: msg.h:74
Simple network buffer representation.
Definition: buf.h:82