[riot-notifications] [RIOT-OS/RIOT] doc/memos: RDM Runtime Configuration Architecture (#10622)

José Alamos notifications at github.com
Thu Jan 10 14:37:41 CET 2019


jia200x commented on this pull request.



> +information.
+
+## 3.1. Registry handlers
+A RH represents a configuration group in the RIOT Registry. A RIOT
+module requires to implement and register a Registry Handler in order to expose
+its configurations to the Registry API.
+
+A RH is defined by a name and a series of handlers for
+interacting with the configuration parameters of the configuration group.
+These handlers are:
+- `set`: Sets a value to a configuration parameter. This handler MUST take care
+  of any logic to apply the value (e.g. data validation) or cache it until the
+commit handler is called
+- `get`: Gets the current value of a configuration parameter
+- `commit`: To be called when configuration parameters have been loaded from
+  storage. It could be use for special needed logic on applying configuration

> "commit: To be called when configuration parameters have been loaded from storage

I will remove this sentence

> commit: does the same as set, but also allows specially needed logic to be executed on applying configuration

Just for reference, `commit` does NOT do exactly the same as `set`. In fact, commit doesn't receive any keys or values.

The `set` handler only "sets" the value and the configuration MAY take effect. However, the only way to make sure all configurations take effect is calling `commit` after a batch of `set` calls

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/10622#discussion_r246760052
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190110/5a5ec3f5/attachment.html>


More information about the notifications mailing list