Skip to content

Commit 6f024d5

Browse files
authored
Merge pull request ARMmbed#13494 from artokin/upstream_mesh_network_size_api_to_master
Add WiSun network size configs in JSON
2 parents fb3d1aa + bb87fa9 commit 6f024d5

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

connectivity/nanostack/mbed-mesh-api/mbed_lib.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,10 @@
120120
"help": "Network name for a wisun network. Maximum network name length can be 32 ASCII characters excluding terminating 0",
121121
"value": "\"Wi-SUN Network\""
122122
},
123+
"wisun-network-size": {
124+
"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.",
125+
"value": null
126+
},
123127
"wisun-regulatory-domain": {
124128
"help": "Regulator domain value as specified in the Wi-SUN PHY Specification. Default value 3 is for EU region.",
125129
"value": "3"

connectivity/nanostack/mbed-mesh-api/source/WisunInterface.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,14 @@ nsapi_error_t WisunInterface::configure()
119119
}
120120
#endif
121121

122+
#ifdef MBED_CONF_MBED_MESH_API_WISUN_NETWORK_SIZE
123+
status = set_network_size(MBED_CONF_MBED_MESH_API_WISUN_NETWORK_SIZE);
124+
if (status < 0) {
125+
tr_error("Failed to set network size");
126+
return NSAPI_ERROR_PARAMETER;
127+
}
128+
#endif
129+
122130
return NSAPI_ERROR_OK;
123131
}
124132

0 commit comments

Comments
 (0)