forked from openthread/openthread
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[meshcop-tlvs] simplify and enhance
ChannelMaskTlv
(openthread#9675)
This commit simplifies `ChannelMaskTlv` generation and parsing. Notably, it ensures that when we read this TLV from a `Message` the TLV value format is validated. The changes include: - `Entry` class representing a channel page entry is now defined as a `private` nested class within `ChannelMaskTlv`. - A shared `EntriesData::Parse()` method is added that validates and parses the entries in the TLV, whether the TLV value resides in a buffer (e.g., within `Dataset`) or in a `Message`. - `ChannelMaskTlv::AppendTo()` method is added to construct entries from a given combined channel mask (for all pages) and append the `ChannelMaskTlv` to a given `Message`. - `Radio::kSupportedChannelPages` is changed to an array (containing all supported pages) instead of mask. - Helper functions added in `Radio`, `SupportsChannelPage()` to verify if a channel page is supported by the radio, and `ChannelMaskForPage()` to obtain the supported channel mask for a given page.
- Loading branch information
Showing
15 changed files
with
282 additions
and
420 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.