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

José Alamos notifications at github.com
Thu Jan 10 14:31:15 CET 2019

jia200x commented on this pull request.

> +void my_export_handler(int (*export_func)(const char *name, char *val), int argc,
+                   char **argv)
+    /* argc  and argv can be used to export only one parameter */
+    (void)argv;
+    (void)argc;
+    char buf[INT_STRING_SIZE];
+    /* We export every parameter with the export function */
+    /* Prepare `buf` to contain is_enabled in a string representation */
+    /* ... */
+    export_func("my_handler/is_enabled", buf);
+    /* Prepare `buf` to contain threshold in a string representation */
+    /* ... */
+    export_func("my_handler/threshold", buf);

>From the RDM:
> export: Calls an export function for each configuration parameter, with its name and value. Depending on the behavior of export function, this can be used for printing out all configurations, saving them in a persistent storage, etc.

`export_func` receives (key, value) and does whatever it has to do with those. In practice, it's used for printing all variables in STDOUT or storing them

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190110/d0253d87/attachment.html>

More information about the notifications mailing list