thermferm/simulator.h

Wed, 01 May 2024 14:38:37 +0200

author
Michiel Broek <mbroek@mbse.eu>
date
Wed, 01 May 2024 14:38:37 +0200
changeset 715
f5d85af156ab
parent 714
24749c296a50
permissions
-rw-r--r--

Added device_present() function to easy update device present from one-wire and simulator devices. When a simulator temperature sensor present is changed, the device table is changed too. Controlling simulator relays is now for each simulator. The simulator runs under the state machine. If something changed in the running simulator, all data is broadcasted over websocket. Completed the web editor.

#ifndef SIMULATOR_H
#define	SIMULATOR_H

#ifdef USE_SIMULATOR

/**
 * @brief Return a json string with one simulator record
 * @param simulator The simulator record
 * @return Json string
 */
char *simulator_json(simulator_list *simulator);


/**
 * @brief Send all simulator records to the websocket
 */
void simulator_ws(void);


/**
 * @brief The simulator thread.
 */
void *my_simulator_loop(void *);

#endif

#endif

mercurial