Added
git-svn-id: http://moon:8086/svn/projects/HendiControl@193 fda53097-d464-4ada-af97-ba876c37ca34
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import time
|
||||
import abc
|
||||
|
||||
|
||||
class ATemperatureSensor(abc.ABC):
|
||||
def __init__(self, name):
|
||||
self.name
|
||||
|
||||
def name(self):
|
||||
return self.name
|
||||
|
||||
@abc.abstractmethod
|
||||
def temperature(self):
|
||||
return None
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
from atemperatureSensor import ATemperatureSensor
|
||||
|
||||
|
||||
class TempSensorSim(ATemperatureSensor):
|
||||
def __init__(self, name):
|
||||
super(TempSensorSim, self).__init__(name)
|
||||
|
||||
def temperature(self):
|
||||
return 22.37
|
||||
|
||||
Reference in New Issue
Block a user