Skip to content

Commit cbc6209

Browse files
authored
Merge pull request #14442 from artokin/update_set_network_size_doc_master
Improve WisunInterface set_network_size docs
2 parents 7f6ff7e + e91f9cb commit cbc6209

File tree

2 files changed

+22
-15
lines changed

2 files changed

+22
-15
lines changed

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

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -160,24 +160,31 @@ class WisunInterface final : public MeshInterfaceNanostack {
160160
/**
161161
* \brief Set Wi-SUN network size.
162162
*
163-
* Function stores new parameters to mbed-mesh-api and uses them when connect() is called next time.
164-
* If device is already connected to the Wi-SUN network then device will restart network discovery after
165-
* changing the network size.
163+
* Function stores network size parameter to the mbed-mesh-api and uses it when connect() is called for the next
164+
* time. If a device is already connected to the Wi-SUN network, then the device will restart network discovery
165+
* after changing the network size.
166+
*
167+
* It is recommended to set the correct network size because some Wi-SUN network configuration parameters are
168+
* adjusted based on the selected network size. A network configured for a small amount of devices may not work
169+
* optimally for large number of devices. This is because the network bandwidth is divided with all the devices in
170+
* the network. Enough bandwidth must be reserved for application data usage as well as the Wi-SUN network
171+
* operations. In addition, the application should adapt to the network characteristics by using the InternetSocket
172+
* methods get_stagger_estimate_to_address() and get_rtt_estimate_to_address().
173+
*
174+
* The network size is measured as hundreds of devices that are expected to join to the network. For example,
175+
* for a 400-device network set network size to 4.
166176
*
167-
* Default value: medium
168-
* Small network size: less than hundred devices
169-
* Medium network size: hundreds of devices
170-
* Large network size: thousands of devices
171-
* Certificate: used on testing
177+
* The Wi-SUN stack will automatically adjust timing and RPL configuration values based on the selected network
178+
* size and data rate. If a customized timing or RPL values are needed, the APIs below should be invoked after
179+
* changing the network size:
180+
* - set_timing_parameters() to set timing settings to the Wi-SUN interface.
181+
* - rpl_parameters_set() to set RPL settings to the Border Router interface.
172182
*
173-
* When network size is changed, it will override all or some of the following configuration values:
174-
* - Timing settings set by set_timing_parameters() of the Wi-SUN interface.
175-
* - RPL settings set by rpl_parameters_set() of the Border Router interface.
183+
* By default the Wi-SUN stack is configured to use a few hundreds of devices.
176184
*
177-
* When network size is changed, and if timing or RPL values should be other than defaults set by stack for the network size,
178-
* they need to set again using above function calls.
185+
* The network size should be set to 0 when running certification tests.
179186
*
180-
* \param network_size Network size in hundreds of devices (e.g. 1200 devices is 12), 0x00 for network size certificate.
187+
* \param network_size Network size in hundreds of devices (e.g. 12 for 1200 devices), 0 for certificate testing.
181188
* \return MESH_ERROR_NONE on success.
182189
* \return MESH_ERROR_UNKNOWN in case of failure.
183190
* */

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

Lines changed: 1 addition & 1 deletion
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": {

0 commit comments

Comments
 (0)