Zephyr API Documentation 4.0.0-rc2
A Scalable Open Source RTOS
|
API for the Bluetooth Mesh Bridge Configuration Client model More...
Data Structures | |
struct | bt_mesh_brg_cfg_cli_cb |
Mesh Bridge Configuration Client Status messages callback. More... | |
struct | bt_mesh_brg_cfg_cli |
Bridge Configuration Client Model Context. More... | |
Macros | |
#define | BT_MESH_MODEL_BRG_CFG_CLI(_cli) |
Bridge Configuration Client model Composition Data entry. | |
Functions | |
int | bt_mesh_brg_cfg_cli_get (uint16_t net_idx, uint16_t addr, enum bt_mesh_brg_cfg_state *status) |
Sends a Subnet Bridge Get message to the given destination address. | |
int | bt_mesh_brg_cfg_cli_set (uint16_t net_idx, uint16_t addr, enum bt_mesh_brg_cfg_state val, enum bt_mesh_brg_cfg_state *status) |
Sends a Subnet Bridge Set message to the given destination address with the given parameters. | |
int | bt_mesh_brg_cfg_cli_table_size_get (uint16_t net_idx, uint16_t addr, uint16_t *size) |
Sends a Bridging Table Size Get message to the given destination address with the given parameters. | |
int | bt_mesh_brg_cfg_cli_table_add (uint16_t net_idx, uint16_t addr, struct bt_mesh_brg_cfg_table_entry *entry, struct bt_mesh_brg_cfg_table_status *rsp) |
Sends a Bridging Table Add message to the given destination address with the given parameters. | |
int | bt_mesh_brg_cfg_cli_table_remove (uint16_t net_idx, uint16_t addr, uint16_t net_idx1, uint16_t net_idx2, uint16_t addr1, uint16_t addr2, struct bt_mesh_brg_cfg_table_status *rsp) |
Sends a Bridging Table Remove message to the given destination address with the given parameters. | |
int | bt_mesh_brg_cfg_cli_subnets_get (uint16_t net_idx, uint16_t addr, struct bt_mesh_brg_cfg_filter_netkey filter_net_idx, uint8_t start_idx, struct bt_mesh_brg_cfg_subnets_list *rsp) |
Sends a Bridged Subnets Get message to the given destination address with the given parameters. | |
int | bt_mesh_brg_cfg_cli_table_get (uint16_t net_idx, uint16_t addr, uint16_t net_idx1, uint16_t net_idx2, uint16_t start_idx, struct bt_mesh_brg_cfg_table_list *rsp) |
Sends a Bridging Table Get message to the given destination address with the given parameters. | |
int32_t | bt_mesh_brg_cfg_cli_timeout_get (void) |
Get the current transmission timeout value. | |
void | bt_mesh_brg_cfg_cli_timeout_set (int32_t timeout) |
Set the transmission timeout value. | |
API for the Bluetooth Mesh Bridge Configuration Client model
#define BT_MESH_MODEL_BRG_CFG_CLI | ( | _cli | ) |
#include <zephyr/bluetooth/mesh/brg_cfg_cli.h>
Bridge Configuration Client model Composition Data entry.
_cli | Pointer to a Bridge Configuration Client Model instance. |
int bt_mesh_brg_cfg_cli_get | ( | uint16_t | net_idx, |
uint16_t | addr, | ||
enum bt_mesh_brg_cfg_state * | status ) |
#include <zephyr/bluetooth/mesh/brg_cfg_cli.h>
Sends a Subnet Bridge Get message to the given destination address.
This function sends a Subnet Bridge Get message to the given destination address to query the value of the Subnet Bridge state of a subnet. The Subnet Bridge state indicates whether the subnet bridged feature is enabled or not. The function expects a Subnet Bridge Status message as a response from the destination node.
This method can be used asynchronously by setting status
as NULL. This way the method will not wait for response and will return immediately after sending the command.
net_idx | Network index to encrypt the message with. |
addr | Target node address. |
status | Status response parameter, returns one of BT_MESH_BRG_CFG_DISABLED or BT_MESH_BRG_CFG_ENABLED on success. |
int bt_mesh_brg_cfg_cli_set | ( | uint16_t | net_idx, |
uint16_t | addr, | ||
enum bt_mesh_brg_cfg_state | val, | ||
enum bt_mesh_brg_cfg_state * | status ) |
#include <zephyr/bluetooth/mesh/brg_cfg_cli.h>
Sends a Subnet Bridge Set message to the given destination address with the given parameters.
This function sends a Subnet Bridge Set message to the given destination address with the given parameters to set the value of the Subnet Bridge state of a subnet. The Subnet Bridge state indicates whether the subnet bridge feature is enabled or not. The function expects a Subnet Bridge Status message as a response from the destination node.
This method can be used asynchronously by setting status
as NULL. This way the method will not wait for response and will return immediately after sending the command.
net_idx | Network index to encrypt the message with. |
addr | Target node address. |
val | Value to set the Subnet Bridge state to. Must be one of BT_MESH_BRG_CFG_DISABLED or BT_MESH_BRG_CFG_ENABLED. |
status | Status response parameter, returns one of BT_MESH_BRG_CFG_DISABLED or BT_MESH_BRG_CFG_ENABLED on success. |
int bt_mesh_brg_cfg_cli_subnets_get | ( | uint16_t | net_idx, |
uint16_t | addr, | ||
struct bt_mesh_brg_cfg_filter_netkey | filter_net_idx, | ||
uint8_t | start_idx, | ||
struct bt_mesh_brg_cfg_subnets_list * | rsp ) |
#include <zephyr/bluetooth/mesh/brg_cfg_cli.h>
Sends a Bridged Subnets Get message to the given destination address with the given parameters.
This function sends a Bridged Subnets Get message to the given destination address with the given parameters to get the list of subnets that are bridged by the node. The function expects a Bridged Subnets List message as a response from the destination node.
This method can be used asynchronously by setting rsp
as NULL. This way the method will not wait for response and will return immediately after sending the command.
When rsp
is set, the user is responsible for providing a buffer for the filtered set of N pairs of NetKey Indexes in bt_mesh_brg_cfg_subnets_list::list. If a buffer is not provided, the bridged subnets won't be copied.
net_idx | Network index to encrypt the message with. |
addr | Target node address. |
filter_net_idx | Filter and NetKey Index used for filtering |
start_idx | Start offset to read in units of Bridging Table state entries |
rsp | Pointer to a struct storing the received response from the server, or NULL to not wait for a response. |
int bt_mesh_brg_cfg_cli_table_add | ( | uint16_t | net_idx, |
uint16_t | addr, | ||
struct bt_mesh_brg_cfg_table_entry * | entry, | ||
struct bt_mesh_brg_cfg_table_status * | rsp ) |
#include <zephyr/bluetooth/mesh/brg_cfg_cli.h>
Sends a Bridging Table Add message to the given destination address with the given parameters.
This function sends a Bridging Table Add message to the given destination address with the given parameters to add an entry to the Bridging Table. The Bridging Table contains the net keys and addresses that are authorized to be bridged by the node. The function expects a Bridging Table Status message as a response from the destination node.
This method can be used asynchronously by setting rsp
as NULL. This way the method will not wait for response and will return immediately after sending the command.
net_idx | Network index to encrypt the message with. |
addr | Target node address. |
entry | Pointer to bridging Table entry to add. |
rsp | Status response parameter |
int bt_mesh_brg_cfg_cli_table_get | ( | uint16_t | net_idx, |
uint16_t | addr, | ||
uint16_t | net_idx1, | ||
uint16_t | net_idx2, | ||
uint16_t | start_idx, | ||
struct bt_mesh_brg_cfg_table_list * | rsp ) |
#include <zephyr/bluetooth/mesh/brg_cfg_cli.h>
Sends a Bridging Table Get message to the given destination address with the given parameters.
This function sends a Bridging Table Get message to the given destination address with the given parameters to get the contents of the Bridging Table. The Bridging Table contains the addresses that are authorized to be bridged by the node. The function expects a Bridging Table List message as a response from the destination node.
This method can be used asynchronously by setting rsp
as NULL. This way the method will not wait for response and will return immediately after sending the command.
When rsp
is set, the user is responsible for providing a buffer for the filtered set of N pairs of NetKey Indexes in bt_mesh_brg_cfg_table_list::list. If a buffer is not provided, the bridged addresses won't be copied. If a buffer size is shorter than received list, only those many entries that fit in the buffer will be copied from the list, and rest will be discarded.
net_idx | Network index to encrypt the message with. |
addr | Target node address. |
net_idx1 | NetKey Index of the first subnet. |
net_idx2 | NetKey Index of the second subnet. |
start_idx | Start offset to read in units of Bridging Table state entries. |
rsp | Pointer to a struct storing the received response from the server, or NULL to not wait for a response. |
int bt_mesh_brg_cfg_cli_table_remove | ( | uint16_t | net_idx, |
uint16_t | addr, | ||
uint16_t | net_idx1, | ||
uint16_t | net_idx2, | ||
uint16_t | addr1, | ||
uint16_t | addr2, | ||
struct bt_mesh_brg_cfg_table_status * | rsp ) |
#include <zephyr/bluetooth/mesh/brg_cfg_cli.h>
Sends a Bridging Table Remove message to the given destination address with the given parameters.
This function sends a Bridging Table Remove message to the given destination address with the given parameters to remove an entry from the Bridging Table. The Bridging Table contains the net keys and addresses that are authorized to be bridged by the node. The function expects a Bridging Table Status message as a response from the destination node.
This method can be used asynchronously by setting rsp
as NULL. This way the method will not wait for response and will return immediately after sending the command.
net_idx | Network index to encrypt the message with. |
addr | Target node address. |
net_idx1 | NetKey Index of the first subnet |
net_idx2 | NetKey Index of the second subnet |
addr1 | Address of the node in the first subnet |
addr2 | Address of the node in the second subnet |
rsp | Pointer to a struct storing the received response from the server, or NULL to not wait for a response. |
#include <zephyr/bluetooth/mesh/brg_cfg_cli.h>
Sends a Bridging Table Size Get message to the given destination address with the given parameters.
This function sends a Bridging Table Size Get message to the given destination address with the given parameters to get the size of the Bridging Table of the node. The Bridging Table size indicates the maximum number of entries that can be stored in the Bridging Table. The function expects a Bridging Table Size Status message as a response from the destination node.
This method can be used asynchronously by setting size
as NULL. This way the method will not wait for response and will return immediately after sending the command.
net_idx | Network index to encrypt the message with. |
addr | Target node address. |
size | Bridging Table size response parameter. |
int32_t bt_mesh_brg_cfg_cli_timeout_get | ( | void | ) |
#include <zephyr/bluetooth/mesh/brg_cfg_cli.h>
Get the current transmission timeout value.
void bt_mesh_brg_cfg_cli_timeout_set | ( | int32_t | timeout | ) |
#include <zephyr/bluetooth/mesh/brg_cfg_cli.h>
Set the transmission timeout value.
timeout | The new transmission timeout. |