Skip to content

Wi-SUN api documentation changes #981

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 4 commits into from
Mar 12, 2019

Conversation

KariHaapalehto
Copy link
Contributor

No description provided.


The application can use the `LoWPANNDInterface` or `ThreadInterface` object for connecting to the mesh network. When successfully connected, the application can use the Mbed [C++ socket APIs](network-socket.html) to create a socket to start communication with a remote peer.
The application can use the `LoWPANNDInterface`, WisunInterface` or `ThreadInterface` object for connecting to the mesh network. When successfully connected, the application can use the Mbed [C++ socket APIs](network-socket.html) to create a socket to start communication with a remote peer.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WisunInterface missing the first `

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

corrected

@@ -276,3 +278,69 @@ Name: mbed-mesh-api.6lowpan-nd-security-mode
Macro name: MBED_CONF_MBED_MESH_API_6LOWPAN_ND_SECURITY_MODE
Value: NONE (set by library:mbed-mesh-api)
```

#### Wi-SUN related configuration parameters
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Configuration should be moved to their own page.
But I don't find the "Configuration" page anymore from os.mbed.com/docs.. it has been very well hidden.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But this is the place, were the thread and 6lowpan configurations are

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it deserves a separate PR.

@SeppoTakalo SeppoTakalo requested a review from mikter February 28, 2019 13:10
@SeppoTakalo
Copy link
Contributor

@mikter Please review, or delegate someone from your team.

@AnotherButler
Copy link
Contributor

Tagging @kegilbert to make sure this works with his config script

@AnotherButler
Copy link
Contributor

Note to self: No code dependency because code already merged: ARMmbed/mbed-os#9838

@kegilbert
Copy link
Contributor

kegilbert commented Feb 28, 2019

There's a few sections as is that will pose issues with the configuration parameter auto-update script.

The tool works by collecting all markdown code blocks and attempting to grab the prefix from the block. That prefix is then used to collect the output of mbed compile --config -v --prefix <PREFIX> and replace the old configuration parameter list. This allows us to keep the list up to date each patch release with minimal effort.

The downsides to this script are mainly:

  1. [Minor] Can't have multiple prefixes in a single code block. For example in configuration/mesh.md,
.....
Name: nanostack-hal.nvm_cfstore
    Description: Use cfstore as a NVM storage. Else RAM simulation will be used
    Defined by: library:nanostack-hal
    No value set
Name: nanostack.configuration
    Description: Build time configuration. Refer to Handbook for valid values. Default: full stack
    Defined by: library:nanostack
    Macro name: MBED_CONF_NANOSTACK_CONFIGURATION
    Value: nanostack_full (set by library:nanostack)

would be a problem since the nanostack parameter would be dropped (only nanostack-hal would be run). With some more work on the tool this could be changed if needed. The current work around would just be to move the prefix to its own code block segment.

  1. [Major] You cannot split up a lengthy list such as mbed-mesh-api into more logical sections as it is done now in configuration/mesh.md as each section will just be replaced by the entirety of the output from mbed compile --config -v --prefix <PREFIX>.

The workaround for that was to combine all of the separated sections into one segment, loosing some depth and clarity in our ability to highlight or group together sections of configuration parameters, but guaranteeing an always up to date list of parameters.

@artokin artokin mentioned this pull request Mar 1, 2019
@AnotherButler
Copy link
Contributor

@KariHaapalehto Can you please make the requested changes, so our config update script works with this doc?

@KariHaapalehto
Copy link
Contributor Author

@SeppoTakalo , could you please comment about [2].
I don't like, that we should combine all mesh-api configurations to one big table just because of the tool. It doesn't make our document any better. Mesh-api contains some generic configuration values and 3 separate interface related configurations. In my opinion they are now well grouped and should be kept separate. Should we just run the tool to update parameter lists and keep them separate?

@AnotherButler
Copy link
Contributor

I'd like to keep all of our pages uniform, up to date and reflective of the code. We do have pages with separations (such as this one), but they're still grouped by code prefix. In this example, we've put the ones that start with "rtos" in one group and the ones that start with "events" in another.

Because the mesh parameters all start with the same prefix, it makes sense for them to belong together. It's painful to remember to manually change one page when we run a script on the others. Also, we eventually hope to put the script into CI, which would make manual changes difficult.

@mikter
Copy link

mikter commented Mar 11, 2019

@artokin could you check these.

Also there was changes in the Wi-SUN/Thread documentations and I think here is a link to those. are these links still functional?

@SeppoTakalo
Copy link
Contributor

I object against combining the values into one list.
This affects the readability too much. Makes it almost unreadable.

We should not choose between readability and maintainability.

@KariHaapalehto
Copy link
Contributor Author

I just pushed update to this pr. I did run the tool and config blocks are updated from the tool output. Nanostack configuration is now splitted to separate blocks based on prefix. Mbed-mesh-api is still splitted to logical blocks, since combining them to one big block would affect to readability.


For understanding the technologies and APIs, please refer to following sections before this one:

- [Network connectivity in Mbed OS](../reference/networking.html) technology page.
- [6LoWPAN Mesh technology](../reference/mesh-tech.html) page.
- [6LoWPAN Mesh class reference](../apis/mesh-api.html) user API.
- [Mesh technology](../reference/mesh-tech.html) page.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has been changed, now 6LoWPAN_ND, Wi-SUN and Thread are having separate page

@@ -53,11 +53,12 @@ Option name | Features supported | Estimated binary size of Nanostack

If you want to optimize the flash usage, you need to configure Nanostack. The configuration to choose depends mostly on the preferred use case.

See the [6LoWPAN technology overview](mesh-tech.html) for the definition of star and mesh networks. These same principles apply also to the Thread protocol.
See the [mesh technology overview](mesh-tech.html) for the definition of star and mesh networks. These same principles apply also to the Wi-SUN and Thread protocols.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mesh-tech now contains mainly 6LoWPAN_ND related information

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

star and mesh network definitions are at mesh-tech page, so no need to update this, but I'll update rest of the links

@AnotherButler
Copy link
Contributor

AnotherButler commented Mar 11, 2019

@kegilbert has graciously agreed to update his script to make this page more readable.

Once he does, please resolve any merge conflicts.

@kegilbert
Copy link
Contributor

kegilbert commented Mar 11, 2019

PR is up, pending review. Will require a minor modification. On all mbed_mesh_api configuration parameter list blocks, please add the following tags following the opening '```' segment on the relevant portions:
heap

thread

6lowpan

wisun

Such as:


Generic Mbed mesh API configuration values

Generic configuration allows you to fine tune Nanostack's heap usage.

'''heap
Configuration parameters

Name: mbed-mesh-api.heap-size
Description: Nanostack's heap size [bytes: 0-65534]
Defined by: library:mbed-mesh-api
Macro name: MBED_CONF_MBED_MESH_API_HEAP_SIZE
Value: 32500 (set by library:mbed-mesh-api)
.....
'''

I can make the changes as well once the merge conflict is resolved if that'd be easier.

Copy link
Contributor

@kegilbert kegilbert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM from my end, thanks!

Spell out number less than 10.
Copy link
Contributor

@AnotherButler AnotherButler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR 👍

@AnotherButler AnotherButler merged commit bf2b8c9 into ARMmbed:development Mar 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants