pi_weather.core.managers.service module¶
Definition of BMP390 sensor service
- class pi_weather.core.managers.service.BMP390Service[source]¶
Bases:
objectBMP390 sensor service class
- static _is_sensor_enabled()[source]¶
Function to check whether current sensor is enabled or disabled from the docker-compose.yaml
- Returns:
True if BMP390 sensor is enabled, False otherwise
- Return type:
- get_latest()[source]¶
Function to get the latest sensor reading
- Returns:
Latest sensor data read by the sensor
- Return type:
- _read_sensor_data()[source]¶
Function to read sensor data This method will record the latest reading + update Prometheus metrics
- Returns:
Nothing
- Return type:
- _log_new_data(p, t, a, st, et)[source]¶
Function to correctly log the new data read (regardless the data acquisition mode
- _on_interrupt()[source]¶
Function to be executed on hardware interrupt
- Returns:
Nothing
- Return type:
- _on_interrupt_end()[source]¶
Function to be executed on hardware interrupt end (when_deactivated)
- Returns:
Nothing
- Return type: