MAJOR refactoring of Sensors code
authorSam Moore <[email protected]>
Wed, 9 Oct 2013 09:34:39 +0000 (17:34 +0800)
committerSam Moore <[email protected]>
Wed, 9 Oct 2013 09:34:39 +0000 (17:34 +0800)
commit289794ba2dcbe6234e25e5d00531b26baee342b7
tree293947bcbd4b18052278809caf0d520278a27a22
parent71c13fe3c04db7f93a69cbc6a6c7c3dc2393bf3f
MAJOR refactoring of Sensors code

Will probably get in trouble for this...

Abstracted out the threaded sensor control logic from the actual initialisation/reading/cleanup of sensors.
Adding a new sensor to the program still isn't just a one line process, but it's a lot more general than before.

Added test sensors for the strain gauges, total CPU usage (because that seemed interesting)

Went a bit insane with power and added a "Piped" sensor type which lets people run external programs for the sensors :S
(As long as it prints doubles to stdout and is unbuffered it will work).
16 files changed:
server/Makefile
server/fastcgi.c
server/main.c
server/parameters
server/run.sh
server/sensor.c
server/sensor.h
server/sensors/Makefile [new file with mode: 0644]
server/sensors/README [new file with mode: 0644]
server/sensors/piped.c [new file with mode: 0644]
server/sensors/piped.h [new file with mode: 0644]
server/sensors/resource.c [new file with mode: 0644]
server/sensors/resource.h [new file with mode: 0644]
server/sensors/strain.c [new file with mode: 0644]
server/sensors/strain.h [new file with mode: 0644]
server/valgrind.sh

UCC git Repository :: git.ucc.asn.au