|
Generalized-Core-Counter 3.20
Particle-based generalized core counter firmware
|
Factory for creating sensor instances. More...
#include <SensorFactory.h>
Static Public Member Functions | |
| static ISensor * | createSensor (SensorType type) |
| Create a sensor instance based on the specified type. | |
| static const char * | getSensorTypeName (SensorType type) |
| Get sensor type name as string. | |
Factory for creating sensor instances.
This centralizes sensor creation and makes it easy to switch sensors without modifying the main application code.
Definition at line 58 of file SensorFactory.h.
|
inlinestatic |
Create a sensor instance based on the specified type.
| type | The sensor type to instantiate |
Definition at line 71 of file SensorFactory.h.
References PIRSensor::instance(), and PIR.
Referenced by SensorManager::initializeFromConfig().
|
inlinestatic |
Get sensor type name as string.
| type | The sensor type |
Definition at line 97 of file SensorFactory.h.
References ACCEL_PRESENCE, DISTANCE, INDOOR_OCCUPANCY, LORA_GATEWAY, OPENMV_OCCUPANCY, OUTDOOR_OCCUPANCY, PIR, RAIN_BUCKET, SOIL_MOISTURE, VEHICLE_MAGNETOMETER, VEHICLE_PRESSURE, VIBRATION_ADVANCED, and VIBRATION_BASIC.