diff -r 000000000000 -r 033898178630 bmsd/nodes.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bmsd/nodes.h Sat Aug 04 21:19:15 2018 +0200 @@ -0,0 +1,24 @@ +/** + * @file nodes.h + */ + +#ifndef _NODES_H +#define _NODES_H + +void node_dump(sys_node_list *node); + +/** + * @brief Birth of a node or data update. Create it in the database if + * never seen before, else just update the database entry. + * @param topic The MQTT topic string, contains the node type and name. + * @param payload The JSON formatted payload with the node details. + */ +void node_birth_data(char *topic, char *payload); + +/** + * @brief Death of a node. Mark it offline in the database. + * @param topic The MQTT topic string, contains the node type and name. + */ +void node_death(char *topic); + +#endif