Skip to content

Commit 3ab72c7

Browse files
author
Arto Kinnunen
authored
Merge pull request #13134 from fredlee12001/WiSun_Size
Add WiSun network size configs in JSON
2 parents f4c1538 + b728321 commit 3ab72c7

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

features/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": "default network name for wisun network",
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.",
125129
"value": "3"

features/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)