TuyaOS
函数
tal_bluetooth_mesh_device.h 文件参考

This is tuya tal_adc file 更多...

#include "tal_bluetooth_mesh_def.h"
tal_bluetooth_mesh_device.h 的引用(Include)关系图:

浏览源代码.

函数

OPERATE_RET tal_element_register (USHORT_T element_index)
 Function to register a elemennt. 更多...
 
VOID tal_firmware_infor_set (UCHAR_T is_key, UCHAR_T *product_id, UCHAR_T *product_key, UINT_T version, UINT_T mesh_category, UCHAR_T need_publish_addr)
 Set the firmware information which mesh provision use. 更多...
 
UCHAR_T tal_get_if_prov_success (VOID)
 Get the mesh node provision state. 更多...
 
USHORT_T * tal_group_addr_sub_list_get (USHORT_T ele_idx, USHORT_T model_id)
 Function to get the subscribe addr list of a model of the element. 更多...
 
OPERATE_RET tal_group_addr_sub_set (UINT_T opcode, USHORT_T ele_index, USHORT_T group_addr)
 Function to subscribe a group address for a model of the element. 更多...
 
OPERATE_RET tal_mesh_ble_recv_cb_init (TAL_BLE_EVT_FUNC_CB ble_event)
 Register the ble gap & gatt data callback . 更多...
 
OPERATE_RET tal_mesh_data_send (USHORT_T src_addr, USHORT_T dst_addr, UINT_T opcode, UCHAR_T *data, USHORT_T data_len)
 Function to send mesh data to unicast/group addr 更多...
 
VOID tal_mesh_fast_prov_enable (UCHAR_T enable)
 Enable/Disable mesh fast provision. 更多...
 
OPERATE_RET tal_mesh_msg_recv_cb_init (tal_mesh_msg_recv_cb access_data_cb)
 Register the mesh access app data callback . 更多...
 
OPERATE_RET tal_mesh_network_state_set (MESH_NETWORK_STATE_SET_T net_state)
 Set the mesh node network state. 更多...
 
VOID tal_mesh_node_provision_enable (MESH_PROVISION_TYPE_T enable)
 Function to enable/disable the provision. If node is unprovision state,using disable param will close the GATT unprovision adv and mesh unprovision beacon, and mesh fast provision will be disabled. 更多...
 
TUYA_WEAK_ATTRIBUTE VOID tal_mesh_state_callback (TAL_MESH_NET_STATE_T state)
 The callback to recieve the network state. 更多...
 
VOID tal_mesh_uuid_set (UCHAR_T *uuid)
 Init the mesh node uuid. 更多...
 
OPERATE_RET tal_model_register (USHORT_T element_index, UINT_T model_id)
 Function to register a model into the element. 更多...
 
USHORT_T tal_primary_ele_addr_get (VOID)
 Get the mesh node primary element address. 更多...
 
VOID tal_primary_ele_addr_set (USHORT_T addr, int flash_save_en)
 Set the mesh node primary element address. 更多...
 

详细描述

This is tuya tal_adc file

版本
1.0
日期
2021-09-10

函数说明

◆ tal_element_register()

OPERATE_RET tal_element_register ( USHORT_T  element_index)

Function to register a elemennt.

参数
[in]element_indexindex of element
返回
SUCCESS ERROR

◆ tal_firmware_infor_set()

VOID tal_firmware_infor_set ( UCHAR_T  is_key,
UCHAR_T *  product_id,
UCHAR_T *  product_key,
UINT_T  version,
UINT_T  mesh_category,
UCHAR_T  need_publish_addr 
)

Set the firmware information which mesh provision use.

参数
[in]is_keyuse product key or product id
[in]product_idproduct id
[in]product_keyproduct key
[in]versionfirmware version
[in]mesh_categorymesh category define by tuya
[in]need_publish_addrif the device need a publish addr distributed by tuya cloud
返回
NULL

◆ tal_get_if_prov_success()

UCHAR_T tal_get_if_prov_success ( VOID  )

Get the mesh node provision state.

返回
the provision state

◆ tal_group_addr_sub_list_get()

USHORT_T * tal_group_addr_sub_list_get ( USHORT_T  ele_idx,
USHORT_T  model_id 
)

Function to get the subscribe addr list of a model of the element.

参数
[in]ele_indexthe index of element
[in]group_addrgroup address
返回
subscribe addr list

◆ tal_group_addr_sub_set()

OPERATE_RET tal_group_addr_sub_set ( UINT_T  opcode,
USHORT_T  ele_index,
USHORT_T  group_addr 
)

Function to subscribe a group address for a model of the element.

参数
[in]opcodeto indicate subscribe or delete
[in]ele_indexthe index of element
[in]group_addrgroup address
返回
tx result

◆ tal_mesh_ble_recv_cb_init()

OPERATE_RET tal_mesh_ble_recv_cb_init ( TAL_BLE_EVT_FUNC_CB  ble_event)

Register the ble gap & gatt data callback .

参数
[in]ble_eventble gap & gatt data receive callback
返回
SUCCESS ERROR

◆ tal_mesh_data_send()

OPERATE_RET tal_mesh_data_send ( USHORT_T  src_addr,
USHORT_T  dst_addr,
UINT_T  opcode,
UCHAR_T *  data,
USHORT_T  data_len 
)

Function to send mesh data to unicast/group addr

参数
[in]src_addrunicast addr of node,if use 0,it will use node primary element addr
[in]dst_addrdestinat addr
[in]opcodemesh op code
[in]datamesh data
[in]data_lendata point
返回
SUCCESS ERROR

◆ tal_mesh_fast_prov_enable()

VOID tal_mesh_fast_prov_enable ( UCHAR_T  enable)

Enable/Disable mesh fast provision.

参数
[in]enable0:disable 1:enable
返回
SUCCESS ERROR

◆ tal_mesh_msg_recv_cb_init()

OPERATE_RET tal_mesh_msg_recv_cb_init ( tal_mesh_msg_recv_cb  access_data_cb)

Register the mesh access app data callback .

参数
[in]access_data_cbmesh access data receive callback
返回
SUCCESS ERROR

◆ tal_mesh_network_state_set()

OPERATE_RET tal_mesh_network_state_set ( MESH_NETWORK_STATE_SET_T  net_state)

Set the mesh node network state.

参数
[in]net_statenetwork state
返回
SUCCESS ERROR

◆ tal_mesh_node_provision_enable()

VOID tal_mesh_node_provision_enable ( MESH_PROVISION_TYPE_T  enable)

Function to enable/disable the provision. If node is unprovision state,using disable param will close the GATT unprovision adv and mesh unprovision beacon, and mesh fast provision will be disabled.

参数
[in]enableenable/disable
返回
SUCCESS ERROR

◆ tal_mesh_state_callback()

TUYA_WEAK_ATTRIBUTE VOID tal_mesh_state_callback ( TAL_MESH_NET_STATE_T  state)

The callback to recieve the network state.

参数
[in]statenetwork state
返回
SUCCESS ERROR

◆ tal_mesh_uuid_set()

VOID tal_mesh_uuid_set ( UCHAR_T *  uuid)

Init the mesh node uuid.

参数
[in]uuidmesh universally unique identifier
返回
NULL

◆ tal_model_register()

OPERATE_RET tal_model_register ( USHORT_T  element_index,
UINT_T  model_id 
)

Function to register a model into the element.

参数
[in]element_indexindex of element
[in]model_idmodel id such as: 0x1000 = generic on off model
返回
SUCCESS ERROR

◆ tal_primary_ele_addr_get()

USHORT_T tal_primary_ele_addr_get ( VOID  )

Get the mesh node primary element address.

返回
the primary element address

◆ tal_primary_ele_addr_set()

VOID tal_primary_ele_addr_set ( USHORT_T  addr,
int  flash_save_en 
)

Set the mesh node primary element address.

参数
[in]addrunicast address
[in]flash_save_ensave in flash or only update in ram
返回
NULL