git-svn-id: http://moon:8086/svn/projects/HendiControl@117 fda53097-d464-4ada-af97-ba876c37ca34
28 lines
378 B
Python
28 lines
378 B
Python
import time
|
|
import abc
|
|
|
|
|
|
class APlant(abc.ABC):
|
|
def __init__(self, params):
|
|
pass
|
|
|
|
def log(self, s):
|
|
print("{:.2f}: {}".format(time.time(), s))
|
|
|
|
@abc.abstractmethod
|
|
def process(self):
|
|
pass
|
|
|
|
@abc.abstractmethod
|
|
def setPower(self, power_W):
|
|
pass
|
|
|
|
@abc.abstractmethod
|
|
def getPower(self):
|
|
return None
|
|
|
|
@abc.abstractmethod
|
|
def getTemperature(self):
|
|
return None
|
|
|