Skip to content

Commit 77b9eb5

Browse files
author
Arto Kinnunen
committed
Improve WisunInterface set_network_size docs
Clarify set_network_size usage and possible parameter values. Clarify wisun-network-size help text in mbed-mesh-api/mbed_lib.json
1 parent 72de765 commit 77b9eb5

File tree

2 files changed

+30
-14
lines changed

2 files changed

+30
-14
lines changed

features/nanostack/mbed-mesh-api/mbed-mesh-api/WisunInterface.h

Lines changed: 28 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -185,24 +185,40 @@ class WisunInterface : public MeshInterfaceNanostack {
185185
/**
186186
* \brief Set Wi-SUN network size.
187187
*
188-
* Function stores new parameters to mbed-mesh-api and uses them when connect() is called next time.
189-
* If device is already connected to the Wi-SUN network then device will restart network discovery after
190-
* changing the network size.
188+
* Function stores network size parameter to the mbed-mesh-api and uses it when connect() is called for the next
189+
* time. If a device is already connected to the Wi-SUN network, then the device will restart network discovery
190+
* after changing the network size.
191+
*
192+
* It is recommended to set the correct network size because the Wi-SUN network configuration parameters are
193+
* adjusted based on the selected network size. A network configured for a small amount of devices may not work
194+
* optimally for large number of devices. This is because the network bandwidth is divided with all the devices in
195+
* the network. Enough bandwidth must be reserved for application data usage as well as the Wi-SUN network
196+
* operations. Application should adapt to the network characteristics by using the InternetSocket methods
197+
* get_stagger_estimate_to_address and get_rtt_estimate_to_address.
198+
*
199+
* The network size is measured as hundreds of devices that are expected to join to the network. For example,
200+
* for a 400-device network set network size to 4. The Wi-SUN stack will internally use one of the four possible
201+
* configuration buckets based on the selected network size and data rate. The configuration buckets are defined
202+
* for a small, medium, large and xlarge networks.
203+
*
204+
* For example, with 150kbs data rate set network size to:
205+
* - 1 to use small configuration bucket.
206+
* - 8 to use medium configuration bucket.
207+
* - 15 to use large configuration bucket.
208+
* - 25 to use xlarge configuration bucket.
209+
*
210+
* By default Wi-SUN stack is configured to use medium sized network.
191211
*
192-
* Default value: medium
193-
* Small network size: less than hundred devices
194-
* Medium network size: hundreds of devices
195-
* Large network size: thousands of devices
196-
* Certificate: used on testing
212+
* The network size should be set to 0 when running certification tests.
197213
*
198-
* When network size is changed, it will override all or some of the following configuration values:
214+
* When the network size is changed, it will override all or some of the following configuration values:
199215
* - Timing settings set by set_timing_parameters() of the Wi-SUN interface.
200216
* - RPL settings set by rpl_parameters_set() of the Border Router interface.
201217
*
202-
* When network size is changed, and if timing or RPL values should be other than defaults set by stack for the network size,
203-
* they need to set again using above function calls.
218+
* When the network size is changed, and if timing or RPL values should be other than defaults set by stack for the
219+
* network size, they need to set again using above function calls.
204220
*
205-
* \param network_size Network size in hundreds of devices (e.g. 1200 devices is 12), 0x00 for network size certificate.
221+
* \param network_size Network size in hundreds of devices (e.g. 12 for 1200 devices), 0 for certificate testing.
206222
* \return MESH_ERROR_NONE on success.
207223
* \return MESH_ERROR_UNKNOWN in case of failure.
208224
* */

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@
121121
"value": "\"Wi-SUN Network\""
122122
},
123123
"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.",
124+
"help": "Expected amount of devices in the network as hundreds of devices. Use any number or one of the predefined values NETWORK_SIZE_SMALL, NETWORK_SIZE_MEDIUM, NETWORK_SIZE_LARGE or NETWORK_SIZE_XLARGE. Set to 0 to use Wi-SUN Certification configuration values. If set to null, then NETWORK_SIZE_MEDIUM (meaning hundreds of devices in the network) will be used.",
125125
"value": null
126126
},
127127
"wisun-regulatory-domain": {
@@ -187,7 +187,7 @@
187187
"root-certificate-len": {
188188
"help": "Root certificate length; optional for PEM format, must be defined for DER format",
189189
"value": null
190-
},
190+
},
191191
"own-certificate": {
192192
"help": "Own certificate; in PEM format must be a null terminated c-string, in DER format the own-certificate-len must be set",
193193
"value": null

0 commit comments

Comments
 (0)