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.
[dataset] introduce
WriteTlv()
methods (openthread#9664)
This commit adds different flavors of `WriteTlv()` including template version as `Write<SimpleTlvType>()`. These methods write or update a TLV in `Dataset`. The new methods replace the previous `SetTlv()` methods. This new approach introduces type safety checks during compilation, guaranteeing the use of the correct value type for each TLV. For instance, `Write<PanIdTlv>()` only accepts `uint16_t` value, while `Write<NetworkKeyTlv>()` only accepts `NetworkKey` value. This commit also renames the previous `GetTlv()` to `FindTlv()`.
- Loading branch information
Showing
7 changed files
with
137 additions
and
180 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
Oops, something went wrong.