Zephyr API Documentation  3.0.0
A Scalable Open Source RTOS
3.0.0
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
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
38 void (*period_status)(struct bt_mesh_health_cli *cli, uint16_t addr,
39 uint8_t divisor);
40
50 void (*attention_status)(struct bt_mesh_health_cli *cli, uint16_t addr,
51 uint8_t attention);
52
68 void (*fault_status)(struct bt_mesh_health_cli *cli, uint16_t addr,
69 uint8_t test_id, uint16_t cid, uint8_t *faults,
70 size_t fault_count);
71
87 void (*current_status)(struct bt_mesh_health_cli *cli, uint16_t addr,
88 uint8_t test_id, uint16_t cid, uint8_t *faults,
89 size_t fault_count);
90
91 /* Internal parameters for tracking message responses. */
93};
94
101#define BT_MESH_MODEL_HEALTH_CLI(cli_data) \
102 BT_MESH_MODEL_CB(BT_MESH_MODEL_ID_HEALTH_CLI, bt_mesh_health_cli_op, \
103 NULL, cli_data, &bt_mesh_health_cli_cb)
104
112
135 uint8_t *test_id, uint8_t *faults,
136 size_t *fault_count);
137
160 uint8_t *test_id, uint8_t *faults,
161 size_t *fault_count);
162
174 uint16_t cid);
175
195 uint8_t test_id, uint8_t *faults,
196 size_t *fault_count);
197
208 uint16_t cid, uint8_t test_id);
209
234 uint8_t *divisor);
235
261 uint8_t *updated_divisor);
262
274 uint8_t divisor);
275
292 uint8_t *attention);
293
312 uint8_t attention, uint8_t *updated_attention);
313
323 uint8_t attention);
324
330
336
338extern const struct bt_mesh_model_op bt_mesh_health_cli_op[];
339extern const struct bt_mesh_model_cb bt_mesh_health_cli_cb;
342#ifdef __cplusplus
343}
344#endif
345
350#endif /* ZEPHYR_INCLUDE_BLUETOOTH_MESH_HEALTH_CLI_H_ */
ZTEST_BMEM int timeout
Definition: main.c:31
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_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_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_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_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_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.
__INT32_TYPE__ int32_t
Definition: stdint.h:44
__UINT8_TYPE__ uint8_t
Definition: stdint.h:58
__UINT16_TYPE__ uint16_t
Definition: stdint.h:59
Definition: health_cli.h:25
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:38
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:68
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:87
struct bt_mesh_msg_ack_ctx ack_ctx
Definition: health_cli.h:92
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:50
Definition: access.h:442
Definition: access.h:165
Definition: access.h:510
Definition: msg.h:117