from components.aplant import APlant class PotReal(APlant): """The real kettle - unlike Pot (components/plant/pot.py), this doesn't model the plant's thermal behavior at all: the real kettle does its own physics, and the real temperature comes straight from the real temperature sensor, not from here (see PlantFactory). Exists purely so a real rig still satisfies the same informal interface PotTask/ SudTask expect from a Pot - set_plant_params()/set_ambient_temperature()/ initial() are accepted and ignored, and get_temperature() has nothing to report.""" def __init__(self): APlant.__init__(self) self.p_in = 0 def is_configured(self): return True def set_plant_params(self, params): pass def set_ambient_temperature(self, theta_amb): pass def initial(self, temp): pass def activate(self, enable): pass def is_activated(self): return True def process(self): pass def set_power(self, power): self.p_in = power def get_power(self): return round(self.p_in, 1) def get_temperature(self): return None