2021-06-01 18:31:50 -04:00
|
|
|
"""
|
|
|
|
Sensor module
|
|
|
|
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
|
|
|
Copyright © 2020 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca
|
|
|
|
"""
|
|
|
|
|
|
|
|
class Sensor:
|
2021-06-02 09:30:01 -04:00
|
|
|
"""
|
|
|
|
Sensor abstract class
|
|
|
|
"""
|
2021-06-01 18:31:50 -04:00
|
|
|
def __init__(self):
|
|
|
|
self._name = None
|
|
|
|
self._type = None
|
|
|
|
self._units = None
|
|
|
|
self._location = None
|
|
|
|
|
|
|
|
@property
|
|
|
|
def name(self):
|
|
|
|
"""
|
|
|
|
Get sensor name
|
|
|
|
"""
|
|
|
|
return self._name
|
|
|
|
|
|
|
|
@name.setter
|
|
|
|
def name(self, value):
|
|
|
|
"""
|
|
|
|
Set sensor name
|
|
|
|
"""
|
|
|
|
self._name = value
|
|
|
|
|
|
|
|
@property
|
|
|
|
def type(self):
|
|
|
|
"""
|
|
|
|
Get sensor type
|
|
|
|
"""
|
|
|
|
return self._type
|
|
|
|
|
|
|
|
@property
|
|
|
|
def units(self):
|
|
|
|
"""
|
|
|
|
Get sensor units
|
|
|
|
"""
|
|
|
|
return self._units
|
|
|
|
|
|
|
|
|
|
|
|
@property
|
|
|
|
def location(self):
|
|
|
|
"""
|
|
|
|
Get sensor location
|
|
|
|
"""
|
|
|
|
return self._location
|
|
|
|
|
|
|
|
|
|
|
|
@location.setter
|
|
|
|
def location(self, value):
|
|
|
|
"""
|
|
|
|
Set sensor location
|
|
|
|
"""
|
|
|
|
self._location = value
|
|
|
|
|
|
|
|
@property
|
|
|
|
def measures(self):
|
|
|
|
raise NotImplementedError
|