KyleBenson / scale_client

The Python-based SCALE Client software for acquiring data from various sensors (i.e. via Raspberry Pi platform), processing it, and sharing it through multiple networks and data exchange protocols.
http://scale.ics.uci.edu/
Other
4 stars 8 forks source link

VirtualSensor should support threshold/condition for use by all children #34

Open KyleBenson opened 7 years ago

KyleBenson commented 7 years ago

A lot of the PhysicalSensor implementations make use of a 'threshold' parameter that's used for conditionally reporting events when they're sampled from the sensor. Instead of each class implementing this logic on its own, we could easily have this be a configurable parameter in VirtualSensor so that all the others can inherit it. Furthermore, it could easily support different conditional operators other than just a 'greater than threshold' one that most use.