git-svn-id: http://moon:8086/svn/projects/HendiControl@380 fda53097-d464-4ada-af97-ba876c37ca34
19 lines
293 B
Python
19 lines
293 B
Python
import abc
|
|
import logging
|
|
|
|
|
|
class ATemperatureSensor(abc.ABC):
|
|
def log(self, s):
|
|
d = {'user': "TemperatureSensor" + "::" + self.name()}
|
|
logging.info ("{}".format(s), extra=d)
|
|
|
|
@abc.abstractmethod
|
|
def name(self):
|
|
return ""
|
|
|
|
@abc.abstractmethod
|
|
def temperature(self):
|
|
return None
|
|
|
|
|