Merge pull request #12894 from mikaleppanen/fea_wisun_nanostack_device_type_config_5_15

Nanostack: Add config for Wi-SUN device type (Mbed OS 5.15)
pull/12893/head
Martin Kojtal 2020-06-08 09:04:37 +02:00 committed by GitHub
commit a3fdbc7944
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 2 deletions

View File

@ -59,7 +59,9 @@ typedef enum {
typedef enum {
MESH_DEVICE_TYPE_THREAD_ROUTER = 0, /*<! Thread router */
MESH_DEVICE_TYPE_THREAD_SLEEPY_END_DEVICE, /*<! Thread Sleepy end device */
MESH_DEVICE_TYPE_THREAD_MINIMAL_END_DEVICE /*<! Thread minimal end device */
MESH_DEVICE_TYPE_THREAD_MINIMAL_END_DEVICE, /*<! Thread minimal end device */
MESH_DEVICE_TYPE_WISUN_ROUTER, /*<! Wi-SUN router */
MESH_DEVICE_TYPE_WISUN_BORDER_ROUTER /*<! Wi-SUN border router */
} mesh_device_type_t;
/**

View File

@ -160,6 +160,10 @@
"help": "Unicast dwell interval. Range: 15-255 milliseconds",
"value": 0
},
"wisun-device-type": {
"help": "Supported device operating modes: MESH_DEVICE_TYPE_WISUN_ROUTER, MESH_DEVICE_TYPE_WISUN_BORDER_ROUTER",
"value": "MESH_DEVICE_TYPE_WISUN_ROUTER"
},
"certificate-header": {
"help": "File name of the certificate header file (used on include directive)",
"value": null

View File

@ -223,7 +223,12 @@ static void wisun_tasklet_configure_and_connect_to_network(void)
int status;
fhss_timer_t *fhss_timer_ptr = &fhss_functions;
wisun_tasklet_data_ptr->operating_mode = NET_6LOWPAN_ROUTER;
if (MBED_CONF_MBED_MESH_API_WISUN_DEVICE_TYPE == MESH_DEVICE_TYPE_WISUN_BORDER_ROUTER) {
wisun_tasklet_data_ptr->operating_mode = NET_6LOWPAN_BORDER_ROUTER;
} else {
wisun_tasklet_data_ptr->operating_mode = NET_6LOWPAN_ROUTER;
}
wisun_tasklet_data_ptr->operating_mode_extension = NET_6LOWPAN_WS;
arm_nwk_interface_configure_6lowpan_bootstrap_set(