3 * @brief Declarations for sensor thread related stuff
13 /** Number of sensors **/
16 /** Sensor ids - there should be correspondence with the names in g_sensor_names **/
33 /** Human readable names for the sensors **/
34 extern const char * g_sensor_names[NUMSENSORS];
36 /** Structure to represent a sensor **/
39 /** ID number of the sensor **/
41 /** DataFile to store sensor values in **/
43 /** Indicates whether the Sensor is active or not **/
45 /** Thread the Sensor is running in **/
47 /** Most recently recorded data **/
48 DataPoint newest_data;
53 // Structure to define the warning and error thresholds of the sensors
62 extern void Sensor_Init(); // One off initialisation of *all* sensors
64 extern void Sensor_SetModeAll(ControlModes mode, void * arg);
65 extern void Sensor_SetMode(Sensor * s, ControlModes mode, void * arg);
67 extern void * Sensor_Loop(void * args); // Main loop for a thread that handles a Sensor
68 extern bool Sensor_Read(Sensor * s, DataPoint * d); // Read a single DataPoint, indicating if it has changed since the last one
69 extern void Sensor_CheckData(SensorId id, double value); // Check a DataPoint
70 extern Sensor * Sensor_Identify(const char * str); // Identify a Sensor from a string Id
72 extern void Sensor_Handler(FCGIContext *context, char * params); // Handle a FCGI request for Sensor data