add abc
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2020-08-19 00:44:04 +02:00
parent 38e7c466c7
commit 7334000eb8
13 changed files with 182 additions and 0 deletions

0
src/sensor/__init__.py Normal file
View File

24
src/sensor/abcsensor.py Normal file
View File

@ -0,0 +1,24 @@
#!/usr/bin/env python3
from abc import ABC, abstractmethod
"""
Abstract base class for Sensor
"""
__author__ = "@tormakris"
__copyright__ = "Copyright 2020, Birbnetes Team"
__module_name__ = "abcsensor"
__version__text__ = "1"
class AbcSensor(ABC):
"""
Abstract base class Sensor. Responsible for value retrieval from hardware sensors.
"""
@abstractmethod
def getvalue(self):
"""
Retrieve a value from a sensor.
:return:
"""
pass