Merge pull request #13134 from fredlee12001/WiSun_Size

Add WiSun network size configs in JSON
pull/13391/head feature-wisun-1.1.0
Arto Kinnunen 2020-07-03 10:12:11 +03:00 committed by GitHub
commit 3ab72c71b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 0 deletions

View File

@ -120,6 +120,10 @@
"help": "default network name for wisun network",
"value": "\"Wi-SUN Network\""
},
"wisun-network-size": {
"help": "Expected amount of devices in the network as 100s of devices. with possible pre defined constants NETWORK_SIZE_SMALL, NETWORK_SIZE_MEDIUM, NETWORK_SIZE_LARGE, NETWORK_SIZE_XLARGE. if set to 0 Wi-SUN Certification configuration values are used. If don't define this(default null), then NETWORK_SIZE_MEDIUM will be used.",
"value": null
},
"wisun-regulatory-domain": {
"help": "Regulator domain.",
"value": "3"

View File

@ -119,6 +119,14 @@ nsapi_error_t WisunInterface::configure()
}
#endif
#ifdef MBED_CONF_MBED_MESH_API_WISUN_NETWORK_SIZE
status = set_network_size(MBED_CONF_MBED_MESH_API_WISUN_NETWORK_SIZE);
if (status < 0) {
tr_error("Failed to set network size");
return NSAPI_ERROR_PARAMETER;
}
#endif
return NSAPI_ERROR_OK;
}