Generalized-Core-Counter 3.20
Particle-based generalized core counter firmware
Loading...
Searching...
No Matches
SensorFactory.h File Reference
#include "ISensor.h"
#include "PIRSensor.h"

Go to the source code of this file.

Classes

class  SensorFactory
 Factory for creating sensor instances. More...

Enumerations

enum class  SensorType : uint8_t {
  VEHICLE_PRESSURE = 0 , PIR = 1 , VEHICLE_MAGNETOMETER = 2 , RAIN_BUCKET = 3 ,
  VIBRATION_BASIC = 4 , VIBRATION_ADVANCED = 5 , INDOOR_OCCUPANCY = 10 , OUTDOOR_OCCUPANCY = 11 ,
  OPENMV_OCCUPANCY = 12 , ACCEL_PRESENCE = 13 , SOIL_MOISTURE = 20 , DISTANCE = 21 ,
  LORA_GATEWAY = 90
}
 Enumeration of available sensor types (backward-compatible IDs). More...

Enumeration Type Documentation

◆ SensorType

enum class SensorType : uint8_t
strong

Enumeration of available sensor types (backward-compatible IDs).

These numeric values are part of the external contract and must remain stable across firmware versions so that previously deployed devices and cloud tools interpret sensorType consistently.

  • 0: VEHICLE_PRESSURE (Vehicle Pressure Sensor)
  • 1: PIR (Pedestrian Infrared Sensor)
  • 2: VEHICLE_MAGNETOMETER (Vehicle Magnetometer Sensor)
  • 3: RAIN_BUCKET (Rain bucket / tipping bucket sensor)
  • 4: VIBRATION_BASIC (Basic vibration / motion sensor)
  • 5: VIBRATION_ADVANCED (Advanced vibration + magnetometer)
  • 10: INDOOR_OCCUPANCY (Indoor room occupancy sensor)
  • 11: OUTDOOR_OCCUPANCY (Outdoor occupancy sensor)
  • 12: OPENMV_OCCUPANCY (OpenMV machine vision occupancy)
  • 13: ACCEL_PRESENCE (Accelerometer-based presence sensor)
  • 20: SOIL_MOISTURE (Soil moisture data sensor)
  • 21: DISTANCE (Ultrasonic/TOF distance sensor)
  • 90: LORA_GATEWAY (LoRA gateway device acting as sensor hub)
Enumerator
VEHICLE_PRESSURE 
PIR 

Pedestrian Infrared Sensor.

VEHICLE_MAGNETOMETER 
RAIN_BUCKET 
VIBRATION_BASIC 
VIBRATION_ADVANCED 
INDOOR_OCCUPANCY 
OUTDOOR_OCCUPANCY 
OPENMV_OCCUPANCY 
ACCEL_PRESENCE 
SOIL_MOISTURE 
DISTANCE 
LORA_GATEWAY 

Definition at line 33 of file SensorFactory.h.