Skip to content

Improve WisunInterface set_network_size docs #14442

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 21 additions & 14 deletions connectivity/nanostack/mbed-mesh-api/mbed-mesh-api/WisunInterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -160,24 +160,31 @@ class WisunInterface final : public MeshInterfaceNanostack {
/**
* \brief Set Wi-SUN network size.
*
* Function stores new parameters to mbed-mesh-api and uses them when connect() is called next time.
* If device is already connected to the Wi-SUN network then device will restart network discovery after
* changing the network size.
* Function stores network size parameter to the mbed-mesh-api and uses it when connect() is called for the next
* time. If a device is already connected to the Wi-SUN network, then the device will restart network discovery
* after changing the network size.
*
* It is recommended to set the correct network size because some Wi-SUN network configuration parameters are
* adjusted based on the selected network size. A network configured for a small amount of devices may not work
* optimally for large number of devices. This is because the network bandwidth is divided with all the devices in
* the network. Enough bandwidth must be reserved for application data usage as well as the Wi-SUN network
* operations. In addition, the application should adapt to the network characteristics by using the InternetSocket
* methods get_stagger_estimate_to_address() and get_rtt_estimate_to_address().
*
* The network size is measured as hundreds of devices that are expected to join to the network. For example,
* for a 400-device network set network size to 4.
*
* Default value: medium
* Small network size: less than hundred devices
* Medium network size: hundreds of devices
* Large network size: thousands of devices
* Certificate: used on testing
* The Wi-SUN stack will automatically adjust timing and RPL configuration values based on the selected network
* size and data rate. If a customized timing or RPL values are needed, the APIs below should be invoked after
* changing the network size:
* - set_timing_parameters() to set timing settings to the Wi-SUN interface.
* - rpl_parameters_set() to set RPL settings to the Border Router interface.
*
* When network size is changed, it will override all or some of the following configuration values:
* - Timing settings set by set_timing_parameters() of the Wi-SUN interface.
* - RPL settings set by rpl_parameters_set() of the Border Router interface.
* By default the Wi-SUN stack is configured to use a few hundreds of devices.
*
* When network size is changed, and if timing or RPL values should be other than defaults set by stack for the network size,
* they need to set again using above function calls.
* The network size should be set to 0 when running certification tests.
*
* \param network_size Network size in hundreds of devices (e.g. 1200 devices is 12), 0x00 for network size certificate.
* \param network_size Network size in hundreds of devices (e.g. 12 for 1200 devices), 0 for certificate testing.
* \return MESH_ERROR_NONE on success.
* \return MESH_ERROR_UNKNOWN in case of failure.
* */
Expand Down
2 changes: 1 addition & 1 deletion connectivity/nanostack/mbed-mesh-api/mbed_lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
"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.",
"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.",
"value": null
},
"wisun-regulatory-domain": {
Expand Down