Zephyr API Documentation 4.0.0-rc2
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
102 /* Internal parameters for tracking message responses. */
104};
105
111#define BT_MESH_MODEL_HEALTH_CLI(cli_data) \
112 BT_MESH_MODEL_CB(BT_MESH_MODEL_ID_HEALTH_CLI, bt_mesh_health_cli_op, \
113 &(cli_data)->pub, cli_data, &bt_mesh_health_cli_cb)
114
138 uint16_t cid, uint8_t *test_id, uint8_t *faults,
139 size_t *fault_count);
140
164 uint16_t cid, uint8_t *test_id, uint8_t *faults,
165 size_t *fault_count);
166
179 struct bt_mesh_msg_ctx *ctx, uint16_t cid);
180
201 uint16_t cid, uint8_t test_id, uint8_t *faults,
202 size_t *fault_count);
203
215 uint16_t cid, uint8_t test_id);
216
242 uint8_t *divisor);
243
270 uint8_t divisor, uint8_t *updated_divisor);
271
284 uint8_t divisor);
285
303 uint8_t *attention);
304
324 uint8_t attention, uint8_t *updated_attention);
325
336 struct bt_mesh_msg_ctx *ctx, uint8_t attention);
337
343
349
351extern const struct bt_mesh_model_op bt_mesh_health_cli_op[];
352extern const struct bt_mesh_model_cb bt_mesh_health_cli_cb;
355#ifdef __cplusplus
356}
357#endif
358
363#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:103
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