bmsd/co2meters.h

Tue, 14 Feb 2023 14:01:02 +0100

author
Michiel Broek <mbroek@mbse.eu>
date
Tue, 14 Feb 2023 14:01:02 +0100
changeset 845
ebf2bdca0d9b
parent 678
14322825cb3d
permissions
-rw-r--r--

Version 0.3.43 bmsd if there is no ssid received from a node message then send '' to the mon_nodes table in the database instead of (null). (one last file)

/**
 * @file co2meters.h
 */

#ifndef _CO2METERS_H
#define _CO2METERS_H

void co2meter_dump(sys_co2meter_list *co2meter);

/**
 * @brief Process received command from a websocket.
 * @param payload The received data in JSON format.
 */
void co2meter_ws_receive(char *payload);

/**
 * @brief Birth of a co2meter 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 co2meter type and name.
 * @param payload The JSON formatted payload with the co2meter details.
 */
void co2meter_birth_data(char *topic, char *payload);

/**
 * @brief Data logging from co2meters.
 * @param topic The MQTT topic string, contains the co2meter type and name.
 * @param payload The JSON formatted payload with the co2meter details.
 */
void co2meter_log(char *topic, char *payload);


#endif

mercurial