|
TuyaOS
|
This is tuya tal_adc file 更多...
#include "tkl_bluetooth_mesh_def.h"
函数 | |
| OPERATE_RET | tkl_mesh_access_normal_data_send (USHORT_T src_addr, USHORT_T dst_addr, UINT_T opcode, UCHAR_T *data, USHORT_T data_len, USHORT_T appkey_idx) |
| Send mesh data to unicast/group addr. 更多... | |
| OPERATE_RET | tkl_mesh_access_rsp_data_send (USHORT_T src_addr, USHORT_T dst_addr, UINT_T opcode, UCHAR_T *data, USHORT_T data_len) |
| Send mesh data to unicast/group addr. 更多... | |
| VOID | tkl_mesh_composition_data_set (USHORT_T company_id, USHORT_T product_id, USHORT_T version_id) |
| Init the mesh node composition data(head). 更多... | |
| VOID | tkl_mesh_device_key_get (UCHAR_T *key) |
| get the mesh node device key. 更多... | |
| VOID | tkl_mesh_device_key_update (UCHAR_T *key) |
| Set the mesh node device key. 更多... | |
| OPERATE_RET | tkl_mesh_element_register (USHORT_T element_index) |
| Function to register a elemennt. 更多... | |
| UCHAR_T | tkl_mesh_get_if_prov_success (VOID) |
| Get the mesh node provision state. 更多... | |
| USHORT_T * | tkl_mesh_group_addr_sub_list_get (USHORT_T ele_idx, UINT_T model_id) |
| Function to get the subscribe addr list of a model of the element. 更多... | |
| OPERATE_RET | tkl_mesh_group_addr_sub_set (USHORT_T opcode, USHORT_T ele_addr, USHORT_T sub_addr, UINT_T model_id) |
| Function to subscribe a group address for a model of the element. 更多... | |
| VOID | tkl_mesh_mode_identity_set (VOID) |
| Set the node PB-GATT ADV use identity type. 更多... | |
| OPERATE_RET | tkl_mesh_model_appkey_bind_all (UINT16_T appkey_idx) |
| Bind all the model use the appkey index input. 更多... | |
| OPERATE_RET | tkl_mesh_model_register (UCHAR_T element_index, TKL_MESH_MODEL_HADLE_T *pmodel_info) |
| Function to register a model into the element. 更多... | |
| OPERATE_RET | tkl_mesh_net_state_cb_register (TKL_MESH_NET_STATE_CB_T mesh_net_state_cb) |
| Function to register a mesh net state callback into tkl. 更多... | |
| VOID | tkl_mesh_network_recover (VOID) |
| Recover the mesh node into provision state. Node recover into provision state with the network parameters in flash. 更多... | |
| VOID | tkl_mesh_network_relay_retransmit_get (UCHAR_T *cnt, UCHAR_T *step) |
| Get the network layer retransmit parameters. 更多... | |
| VOID | tkl_mesh_network_relay_retransmit_set (UCHAR_T cnt, UCHAR_T step) |
| Set the network layer relay retransmit parameters. 更多... | |
| VOID | tkl_mesh_network_reset (VOID) |
| Reset the mesh node into unprovision state. The unprovision state should store in flash,and the clear the network parameters. 更多... | |
| VOID | tkl_mesh_network_reset_in_ram (VOID) |
| Reset the mesh node into unprovision state. The unprovision state only keep in ram,and must not clear the network parameters. 更多... | |
| VOID | tkl_mesh_network_transmit_get (UCHAR_T *cnt, UCHAR_T *step) |
| Get the network layer retransmit parameters. 更多... | |
| VOID | tkl_mesh_network_transmit_set (UCHAR_T cnt, UCHAR_T step) |
| Set the network layer retransmit parameters. 更多... | |
| UCHAR_T | tkl_mesh_node_default_ttl_get (void) |
| Get the node defalut ttl. 更多... | |
| OPERATE_RET | tkl_mesh_node_default_ttl_set (UCHAR_T ttl) |
| Set the node defalut ttl. 更多... | |
| UCHAR_T | tkl_mesh_node_features_get (MESH_FEATURE_T featrue) |
| Get the node feature. 更多... | |
| OPERATE_RET | tkl_mesh_node_features_set (MESH_FEATURE_T featrue, UCHAR_T enable) |
| Set the node feature. 更多... | |
| VOID | tkl_mesh_node_param_save_all (VOID) |
| Save all mesh param into flash. 更多... | |
| VOID | tkl_mesh_node_pbgatt_adv_enable (UCHAR_T enable) |
| Close the mesh node gatt adv. Only use in unprovision state. 更多... | |
| VOID | tkl_mesh_node_unprovision_beacon_enable (UCHAR_T enable) |
| Close the mesh node mesh beacon. Only use in unprovision state. 更多... | |
| USHORT_T | tkl_mesh_primary_ele_addr_get (VOID) |
| Get the mesh node primary element address. 更多... | |
| VOID | tkl_mesh_primary_ele_addr_set (USHORT_T addr, int flash_save_en) |
| Set the mesh node primary element address. 更多... | |
| OPERATE_RET | tkl_mesh_provision_data_set (UCHAR_T prov_en, TKL_NET_PROV_DATA_T *prov_data, TKL_APP_KEY_DATA_T *app_key) |
| Update the mesh network provision data and the app key data. Use this function node can provision itself into provision state. 更多... | |
| VOID | tkl_mesh_seq_cache_reset (USHORT_T addr) |
| Reset the seq cache. 更多... | |
| VOID | tkl_mesh_uuid_set (UCHAR_T *uuid) |
| Init the mesh node uuid. 更多... | |
This is tuya tal_adc file
| OPERATE_RET tkl_mesh_access_normal_data_send | ( | USHORT_T | src_addr, |
| USHORT_T | dst_addr, | ||
| UINT_T | opcode, | ||
| UCHAR_T * | data, | ||
| USHORT_T | data_len, | ||
| USHORT_T | appkey_idx | ||
| ) |
Send mesh data to unicast/group addr.
| [in] | src_addr | element addr of node |
| [in] | dst_addr | destinat addr |
| [in] | opcode | mesh op code |
| [in] | data | data point |
| [in] | data_len | data point |
| [in] | appkey_idx | use which appkey index |
| OPERATE_RET tkl_mesh_access_rsp_data_send | ( | USHORT_T | src_addr, |
| USHORT_T | dst_addr, | ||
| UINT_T | opcode, | ||
| UCHAR_T * | data, | ||
| USHORT_T | data_len | ||
| ) |
Send mesh data to unicast/group addr.
| [in] | src_addr | element addr of node |
| [in] | dst_addr | destinat addr |
| [in] | opcode | mesh op code |
| [in] | data | data point |
| [in] | data_len | data point |
| VOID tkl_mesh_composition_data_set | ( | USHORT_T | company_id, |
| USHORT_T | product_id, | ||
| USHORT_T | version_id | ||
| ) |
Init the mesh node composition data(head).
| [in] | company_id | company identifier assigned by the Bluetooth SIG |
| [in] | product_id | product identifier |
| [in] | version_id | product version identifier |
| VOID tkl_mesh_device_key_get | ( | UCHAR_T * | key | ) |
get the mesh node device key.
| [in] | key | point of device key |
| VOID tkl_mesh_device_key_update | ( | UCHAR_T * | key | ) |
Set the mesh node device key.
| [in] | key | point of device key |
| OPERATE_RET tkl_mesh_element_register | ( | USHORT_T | element_index | ) |
Function to register a elemennt.
| [in] | element_index | index of element |
| UCHAR_T tkl_mesh_get_if_prov_success | ( | VOID | ) |
Get the mesh node provision state.
| USHORT_T * tkl_mesh_group_addr_sub_list_get | ( | USHORT_T | ele_idx, |
| UINT_T | model_id | ||
| ) |
Function to get the subscribe addr list of a model of the element.
| [in] | ele_index | the index of element |
| [in] | group_addr | group address |
| OPERATE_RET tkl_mesh_group_addr_sub_set | ( | USHORT_T | opcode, |
| USHORT_T | ele_addr, | ||
| USHORT_T | sub_addr, | ||
| UINT_T | model_id | ||
| ) |
Function to subscribe a group address for a model of the element.
| [in] | opcode | to indicate subscribe or delete |
| [in] | ele_index | the index of element |
| [in] | group_addr | group address |
| VOID tkl_mesh_mode_identity_set | ( | VOID | ) |
Set the node PB-GATT ADV use identity type.
| OPERATE_RET tkl_mesh_model_appkey_bind_all | ( | UINT16_T | appkey_idx | ) |
Bind all the model use the appkey index input.
| [in] | appkey_idx | app key index |
| OPERATE_RET tkl_mesh_model_register | ( | UCHAR_T | element_index, |
| TKL_MESH_MODEL_HADLE_T * | pmodel_info | ||
| ) |
Function to register a model into the element.
| [in] | element_index | index of element |
| [in] | pmodel_info | model information |
| OPERATE_RET tkl_mesh_net_state_cb_register | ( | TKL_MESH_NET_STATE_CB_T | mesh_net_state_cb | ) |
Function to register a mesh net state callback into tkl.
| [in] | TKL_MESH_NET_STATE_CB_T | callback |
| VOID tkl_mesh_network_recover | ( | VOID | ) |
Recover the mesh node into provision state. Node recover into provision state with the network parameters in flash.
| VOID tkl_mesh_network_relay_retransmit_get | ( | UCHAR_T * | cnt, |
| UCHAR_T * | step | ||
| ) |
Get the network layer retransmit parameters.
| [out] | cnt | transmit cnt = (cnt + 1) times |
| [out] | step | retransmission interval = (net_trans_steps + 1) * 10ms |
| VOID tkl_mesh_network_relay_retransmit_set | ( | UCHAR_T | cnt, |
| UCHAR_T | step | ||
| ) |
Set the network layer relay retransmit parameters.
| [in] | cnt | transmit cnt = (cnt + 1) times |
| [in] | step | retransmission interval = (net_trans_steps + 1) * 10ms |
| VOID tkl_mesh_network_reset | ( | VOID | ) |
Reset the mesh node into unprovision state. The unprovision state should store in flash,and the clear the network parameters.
| VOID tkl_mesh_network_reset_in_ram | ( | VOID | ) |
Reset the mesh node into unprovision state. The unprovision state only keep in ram,and must not clear the network parameters.
| VOID tkl_mesh_network_transmit_get | ( | UCHAR_T * | cnt, |
| UCHAR_T * | step | ||
| ) |
Get the network layer retransmit parameters.
| [out] | cnt | transmit cnt = (cnt + 1) times |
| [out] | step | retransmission interval = (net_trans_steps + 1) * 10ms |
| VOID tkl_mesh_network_transmit_set | ( | UCHAR_T | cnt, |
| UCHAR_T | step | ||
| ) |
Set the network layer retransmit parameters.
| [in] | cnt | transmit cnt = (cnt + 1) times |
| [in] | step | retransmission interval = (net_trans_steps + 1) * 10ms |
| UCHAR_T tkl_mesh_node_default_ttl_get | ( | void | ) |
Get the node defalut ttl.
| OPERATE_RET tkl_mesh_node_default_ttl_set | ( | UCHAR_T | ttl | ) |
Set the node defalut ttl.
| [in] | ttl(time | to live). |
| UCHAR_T tkl_mesh_node_features_get | ( | MESH_FEATURE_T | featrue | ) |
Get the node feature.
| [in] | featrue | Relay, proxy, friend or Low Power. |
| OPERATE_RET tkl_mesh_node_features_set | ( | MESH_FEATURE_T | featrue, |
| UCHAR_T | enable | ||
| ) |
Set the node feature.
| [in] | featrue | Relay, proxy, friend or Low Power. |
| [in] | enable | Enable or Disable |
| VOID tkl_mesh_node_param_save_all | ( | VOID | ) |
Save all mesh param into flash.
| VOID tkl_mesh_node_pbgatt_adv_enable | ( | UCHAR_T | enable | ) |
Close the mesh node gatt adv. Only use in unprovision state.
| [in] | enable | enable or disable the adv |
| VOID tkl_mesh_node_unprovision_beacon_enable | ( | UCHAR_T | enable | ) |
Close the mesh node mesh beacon. Only use in unprovision state.
| [in] | enable | enable or disable the adv |
| USHORT_T tkl_mesh_primary_ele_addr_get | ( | VOID | ) |
Get the mesh node primary element address.
| VOID tkl_mesh_primary_ele_addr_set | ( | USHORT_T | addr, |
| int | flash_save_en | ||
| ) |
Set the mesh node primary element address.
| [in] | addr | unicast address |
| [in] | flash_save_en | save in flash or only update in ram |
| OPERATE_RET tkl_mesh_provision_data_set | ( | UCHAR_T | prov_en, |
| TKL_NET_PROV_DATA_T * | prov_data, | ||
| TKL_APP_KEY_DATA_T * | app_key | ||
| ) |
Update the mesh network provision data and the app key data. Use this function node can provision itself into provision state.
| [in] | prov_en | 0 device is unprovision state, only update in ram 1 device is provisioned state, save in flash |
| [in] | prov_data | network provision data |
| [in] | app_key | app key data |
| VOID tkl_mesh_seq_cache_reset | ( | USHORT_T | addr | ) |
Reset the seq cache.
| [in] | addr | the src addr |
| VOID tkl_mesh_uuid_set | ( | UCHAR_T * | uuid | ) |
Init the mesh node uuid.
| [in] | uuid | mesh universally unique identifier |