Merge pull request #13495 from artokin/upstream_mesh_network_size_api_to_5_15

[mbed-os-5.15] Add WiSun network size configs in JSON
pull/13693/head
Martin Kojtal 2020-09-30 11:30:44 +01:00 committed by GitHub
commit b67e542a69
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", "help": "default network name for wisun network",
"value": "\"Wi-SUN 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": { "wisun-regulatory-domain": {
"help": "Regulator domain.", "help": "Regulator domain.",
"value": "3" "value": "3"

View File

@ -119,6 +119,14 @@ nsapi_error_t WisunInterface::configure()
} }
#endif #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; return NSAPI_ERROR_OK;
} }