3 * @brief Declarations for sensor thread related stuff
11 /** Number of sensors **/
26 /** Human readable names for the sensors **/
27 extern const char * g_sensor_names[NUMSENSORS];
30 /** Structure to represent a sensor **/
33 /** ID number of the sensor **/
35 /** DataFile to store sensor values in **/
37 /** Indicates whether the Sensor should record data **/
39 /** Thread the Sensor is running in **/
41 /** Most recently recorded data **/
42 DataPoint newest_data;
46 // Structure to define the warning and error thresholds of the sensors
55 extern void Sensor_Init(); // One off initialisation of *all* sensors
57 extern void Sensor_StartAll(const char * experiment_name); // Start all Sensors recording data
58 extern void Sensor_StopAll(); // Stop all Sensors recording data
59 extern void Sensor_Start(Sensor * s, const char * experiment_name); // Start a sensor recording datas
60 extern void Sensor_Stop(Sensor * s); // Stop a Sensor from recording data
63 extern void * Sensor_Loop(void * args); // Main loop for a thread that handles a Sensor
64 extern bool Sensor_Read(Sensor * s, DataPoint * d); // Read a single DataPoint, indicating if it has changed since the last one
65 extern void Sensor_CheckData(SensorId id, double value); // Check a DataPoint
66 extern Sensor * Sensor_Identify(const char * str); // Identify a Sensor from a string Id
68 extern void Sensor_Handler(FCGIContext *context, char * params); // Handle a FCGI request for Sensor data