|
| virtual SensorData | getData () const =0 |
| | Get the latest sensor data.
|
| virtual const char * | getSensorType () const =0 |
| | Get sensor type identifier.
|
| virtual bool | initializeHardware () |
| | Initialize underlying hardware after power-on.
|
| virtual bool | isHealthy () const |
| | Health check for the sensor.
|
| virtual bool | isReady () const =0 |
| | Check if sensor is initialized and ready.
|
| virtual int | lastErrorCode () const |
| | Last sensor-specific error code (if any).
|
| virtual bool | loop ()=0 |
| | Poll the sensor for new data.
|
| virtual void | onSleep () |
| | Notification that the device is entering deep sleep.
|
| virtual bool | onWake () |
| | Notification that the device is waking from deep sleep.
|
| virtual void | reset ()=0 |
| | Reset sensor state and clear any cached data.
|
| virtual bool | setup ()=0 |
| | Initialize the sensor hardware.
|
| virtual bool | usesInterrupt () const |
| | Whether this sensor uses a hardware interrupt for events.
|
| virtual | ~ISensor () |
Abstract interface for all sensors.
This allows the main code to work with any sensor type without knowing the implementation details. All sensors must implement this interface.
Definition at line 75 of file ISensor.h.