git.ucc.asn.au
/
matches
/
MCTX3420.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Simple safety check
[matches/MCTX3420.git]
/
server
/
sensor.h
diff --git
a/server/sensor.h
b/server/sensor.h
index
f6c9047
..
4c9de1b
100644
(file)
--- a/
server/sensor.h
+++ b/
server/sensor.h
@@
-8,19
+8,27
@@
/** Number of data points to keep in sensor buffers **/
#define SENSOR_DATABUFSIZ 10
/** Number of data points to keep in sensor buffers **/
#define SENSOR_DATABUFSIZ 10
-
+/** Size of the query buffer. @see Sensor_Handler **/
#define SENSOR_QUERYBUFSIZ 10
/** Number of sensors **/
#define NUMSENSORS 4
#define SENSOR_QUERYBUFSIZ 10
/** Number of sensors **/
#define NUMSENSORS 4
-typedef enum SensorId{
+/** Safety Values for sensors **/
+#define ANALOG_TEST0_SAFETY 1000
+#define ANALOG_TEST1_SAFETY 1000
+#define DIGITAL_TEST0_SAFETY 1
+#define DIGITAL_TEST1_SAFETY 1
+
+
+typedef enum SensorId {
ANALOG_TEST0,
ANALOG_TEST1,
DIGITAL_TEST0,
DIGITAL_TEST1
} SensorId;
ANALOG_TEST0,
ANALOG_TEST1,
DIGITAL_TEST0,
DIGITAL_TEST1
} SensorId;
+/** Human readable names for the sensors **/
extern const char * g_sensor_names[NUMSENSORS];
/** Structure to represent data recorded by a sensor at an instant in time **/
extern const char * g_sensor_names[NUMSENSORS];
/** Structure to represent data recorded by a sensor at an instant in time **/
@@
-64,6
+72,5
@@
extern int Sensor_Query(Sensor * s, DataPoint * buffer, int bufsiz); // fill buf
extern void Sensor_Handler(FCGIContext *context, char * params);
extern void Sensor_Handler(FCGIContext *context, char * params);
-
#endif //_SENSOR_H
#endif //_SENSOR_H
UCC
git Repository :: git.ucc.asn.au