Zephyr API Documentation 3.7.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
Bridge Configuration Client Model

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_subnet_bridge_get (uint16_t net_idx, uint16_t addr, enum bt_mesh_subnet_bridge_state *status)
 Sends a Subnet Bridge Get message to the given destination address.
 
int bt_mesh_brg_cfg_cli_subnet_bridge_set (uint16_t net_idx, uint16_t addr, enum bt_mesh_subnet_bridge_state val, enum bt_mesh_subnet_bridge_state *status)
 Sends a Subnet Bridge Set message to the given destination address with the given parameters.
 
int bt_mesh_brg_cfg_cli_bridging_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_bridging_table_add (uint16_t net_idx, uint16_t addr, struct bt_mesh_bridging_table_entry *entry, struct bt_mesh_bridging_table_status *rsp)
 Sends a Bridging Table Add message to the given destination address with the given parameters.
 
int bt_mesh_brg_cfg_cli_bridging_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_bridging_table_status *rsp)
 Sends a Bridging Table Remove message to the given destination address with the given parameters.
 
int bt_mesh_brg_cfg_cli_bridged_subnets_get (uint16_t net_idx, uint16_t addr, struct bt_mesh_filter_netkey filter_net_idx, uint8_t start_idx, struct bt_mesh_bridged_subnets_list *rsp)
 Sends a Bridged Subnets Get message to the given destination address with the given parameters.
 
int bt_mesh_brg_cfg_cli_bridging_table_get (uint16_t net_idx, uint16_t addr, uint16_t net_idx1, uint16_t net_idx2, uint16_t start_idx, struct bt_mesh_bridging_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.
 

Detailed Description

API for the Bluetooth Mesh Bridge Configuration Client model

Macro Definition Documentation

◆ BT_MESH_MODEL_BRG_CFG_CLI

#define BT_MESH_MODEL_BRG_CFG_CLI ( _cli)

#include <zephyr/bluetooth/mesh/brg_cfg_cli.h>

Value:
BT_MESH_MODEL_CB(BT_MESH_MODEL_ID_BRG_CFG_CLI, _bt_mesh_brg_cfg_cli_op, NULL, _cli, \
&_bt_mesh_brg_cfg_cli_cb)
#define BT_MESH_MODEL_ID_BRG_CFG_CLI
Bridge Configuration Client.
Definition access.h:193
#define BT_MESH_MODEL_CB(_id, _op, _pub, _user_data, _cb)
Composition data SIG model entry with callback functions.
Definition access.h:495

Bridge Configuration Client model Composition Data entry.

Parameters
_cliPointer to a Bridge Configuration Client Model instance.

Function Documentation

◆ bt_mesh_brg_cfg_cli_bridged_subnets_get()

int bt_mesh_brg_cfg_cli_bridged_subnets_get ( uint16_t net_idx,
uint16_t addr,
struct bt_mesh_filter_netkey filter_net_idx,
uint8_t start_idx,
struct bt_mesh_bridged_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_bridged_subnets_list::list. If a buffer is not provided, the bridged subnets won't be copied.

Parameters
net_idxNetwork index to encrypt the message with.
addrTarget node address.
filter_net_idxFilter and NetKey Index used for filtering
start_idxStart offset to read in units of Bridging Table state entries
rspPointer to a struct storing the received response from the server, or NULL to not wait for a response.
Returns
0 on success, or (negative) error code on failure.

◆ bt_mesh_brg_cfg_cli_bridging_table_add()

int bt_mesh_brg_cfg_cli_bridging_table_add ( uint16_t net_idx,
uint16_t addr,
struct bt_mesh_bridging_table_entry * entry,
struct bt_mesh_bridging_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.

Parameters
net_idxNetwork index to encrypt the message with.
addrTarget node address.
entryPointer to bridging Table entry to add.
rspStatus response parameter
Returns
0 on success, or (negative) error code on failure.

◆ bt_mesh_brg_cfg_cli_bridging_table_get()

int bt_mesh_brg_cfg_cli_bridging_table_get ( uint16_t net_idx,
uint16_t addr,
uint16_t net_idx1,
uint16_t net_idx2,
uint16_t start_idx,
struct bt_mesh_bridging_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_bridging_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.

Parameters
net_idxNetwork index to encrypt the message with.
addrTarget node address.
net_idx1NetKey Index of the first subnet.
net_idx2NetKey Index of the second subnet.
start_idxStart offset to read in units of Bridging Table state entries.
rspPointer to a struct storing the received response from the server, or NULL to not wait for a response.
Returns
0 on success, or (negative) error code on failure.

◆ bt_mesh_brg_cfg_cli_bridging_table_remove()

int bt_mesh_brg_cfg_cli_bridging_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_bridging_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.

Parameters
net_idxNetwork index to encrypt the message with.
addrTarget node address.
net_idx1NetKey Index of the first subnet
net_idx2NetKey Index of the second subnet
addr1Address of the node in the first subnet
addr2Address of the node in the second subnet
rspPointer to a struct storing the received response from the server, or NULL to not wait for a response.
Returns
0 on success, or (negative) error code on failure.

◆ bt_mesh_brg_cfg_cli_bridging_table_size_get()

int bt_mesh_brg_cfg_cli_bridging_table_size_get ( uint16_t net_idx,
uint16_t addr,
uint16_t * size )

#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.

Parameters
net_idxNetwork index to encrypt the message with.
addrTarget node address.
sizeBridging Table size response parameter.
Returns
0 on success, or (negative) error code on failure.

◆ bt_mesh_brg_cfg_cli_subnet_bridge_get()

int bt_mesh_brg_cfg_cli_subnet_bridge_get ( uint16_t net_idx,
uint16_t addr,
enum bt_mesh_subnet_bridge_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.

Parameters
net_idxNetwork index to encrypt the message with.
addrTarget node address.
statusStatus response parameter, returns one of BT_MESH_SUBNET_BRIDGE_DISABLED or BT_MESH_SUBNET_BRIDGE_ENABLED on success.
Returns
0 on success, or (negative) error code on failure.

◆ bt_mesh_brg_cfg_cli_subnet_bridge_set()

int bt_mesh_brg_cfg_cli_subnet_bridge_set ( uint16_t net_idx,
uint16_t addr,
enum bt_mesh_subnet_bridge_state val,
enum bt_mesh_subnet_bridge_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.

Parameters
net_idxNetwork index to encrypt the message with.
addrTarget node address.
valValue to set the Subnet Bridge state to. Must be one of BT_MESH_SUBNET_BRIDGE_DISABLED or BT_MESH_SUBNET_BRIDGE_ENABLED.
statusStatus response parameter, returns one of BT_MESH_SUBNET_BRIDGE_DISABLED or BT_MESH_SUBNET_BRIDGE_ENABLED on success.
Returns
0 on success, or (negative) error code on failure.

◆ bt_mesh_brg_cfg_cli_timeout_get()

int32_t bt_mesh_brg_cfg_cli_timeout_get ( void )

#include <zephyr/bluetooth/mesh/brg_cfg_cli.h>

Get the current transmission timeout value.

Returns
The configured transmission timeout in milliseconds.

◆ bt_mesh_brg_cfg_cli_timeout_set()

void bt_mesh_brg_cfg_cli_timeout_set ( int32_t timeout)

#include <zephyr/bluetooth/mesh/brg_cfg_cli.h>

Set the transmission timeout value.

Parameters
timeoutThe new transmission timeout.