3 * @brief Declarations for sensor thread related stuff
11 /** Number of sensors **/
14 /** Sensor ids - there should be correspondence with the names in g_sensor_names **/
25 /** Human readable names for the sensors **/
26 extern const char * g_sensor_names[NUMSENSORS];
28 /** Structure to represent a sensor **/
31 /** ID number of the sensor **/
33 /** DataFile to store sensor values in **/
35 /** Indicates whether the Sensor is active or not **/
37 /** Thread the Sensor is running in **/
39 /** Most recently recorded data **/
40 DataPoint newest_data;
43 // Structure to define the warning and error thresholds of the sensors
52 extern void Sensor_Init(); // One off initialisation of *all* sensors
54 extern void Sensor_SetModeAll(ControlModes mode, void * arg);
55 extern void Sensor_SetMode(Sensor * s, ControlModes mode, void * arg);
57 extern void * Sensor_Loop(void * args); // Main loop for a thread that handles a Sensor
58 extern bool Sensor_Read(Sensor * s, DataPoint * d); // Read a single DataPoint, indicating if it has changed since the last one
59 extern void Sensor_CheckData(SensorId id, double value); // Check a DataPoint
60 extern Sensor * Sensor_Identify(const char * str); // Identify a Sensor from a string Id
62 extern void Sensor_Handler(FCGIContext *context, char * params); // Handle a FCGI request for Sensor data