mesh: extract mesh_node_startup_from_tlv from test app

This commit is contained in:
Matthias Ringwald 2019-07-10 17:28:58 +02:00
parent bc9a9795bb
commit f46a0f51ed
4 changed files with 24 additions and 18 deletions

View File

@ -214,25 +214,8 @@ static void packet_handler (uint8_t packet_type, uint16_t channel, uint8_t *pack
provisioned = 1;
mesh_access_setup_from_provisioning_data(&provisioning_data);
// load iv index
mesh_restore_iv_index_and_sequence_number();
// load network keys
mesh_load_network_keys();
// load app keys
mesh_load_app_keys();
// load model to appkey bindings
mesh_load_appkey_lists();
// load virtual addresses
mesh_load_virtual_addresses();
// load model subscriptions
mesh_load_subscriptions();
// load model publications
mesh_load_publications();
// load foundation state
mesh_foundation_state_load();
// dump data
mesh_provisioning_dump(&provisioning_data);
mesh_node_startup_from_tlv();
// dump PTS MeshOptions.ini
mesh_pts_dump_mesh_options();
@ -262,6 +245,7 @@ static void packet_handler (uint8_t packet_type, uint16_t channel, uint8_t *pack
case HCI_EVENT_DISCONNECTION_COMPLETE:
// enable PB_GATT
if (provisioned == 0){
printf("Advertise Mesh Provisiong Service with Device UUID\n");
mesh_proxy_start_advertising_unprovisioned_device(test_device_uuid);
} else {
#ifdef ENABLE_MESH_PROXY_SERVER

View File

@ -1781,3 +1781,4 @@ void mesh_access_setup_without_provisiong_data(const uint8_t * device_uuid){
mesh_proxy_start_advertising_unprovisioned_device(device_uuid);
#endif
}

View File

@ -2283,3 +2283,22 @@ void mesh_node_reset(void){
mesh_delete_publications();
}
void mesh_node_startup_from_tlv(void){
// load iv index
mesh_restore_iv_index_and_sequence_number();
// load network keys
mesh_load_network_keys();
// load app keys
mesh_load_app_keys();
// load model to appkey bindings
mesh_load_appkey_lists();
// load virtual addresses
mesh_load_virtual_addresses();
// load model subscriptions
mesh_load_subscriptions();
// load model publications
mesh_load_publications();
// load foundation state
mesh_foundation_state_load();
}

View File

@ -97,6 +97,8 @@ void mesh_delete_publications(void);
//
void mesh_node_reset(void);
void mesh_node_startup_from_tlv(void);
// PTS Testing
void config_nekey_list_set_max(uint16_t max);