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

José Alamos notifications at github.com
Tue Jan 8 09:31:23 CET 2019


jia200x commented on this pull request.



> +
+/* These are the state variables and parameters defined for this module */
+static int is_enabled = false;
+static int threshold = 0;
+
+/* ... */
+
+/* Dummy implementation of `get` handler.
+   For both configuration parameters, it copies the value to a `val` variable.
+*/
+char *my_get_handler(int argc, char **argv, char *val, int val_len_max)
+{
+    if (argc) {
+        if (!strcmp("is_enabled", argv[0])) {
+            /* Copy the value of `is_enabled` to `val` so the user can read it */
+            memcpy(val, &is_enabled, sizeof(int));

Agreed!

-- 
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_r245910380
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190108/2a3402da/attachment.html>


More information about the notifications mailing list