from utils.value import AttributeChange class Connectable(AttributeChange): """Observable hardware-connection state shared by AHeater/AStirrer. Simulated devices are always connected; real (serial) devices start disconnected and only flip once connect() actually reaches the hardware. """ def __init__(self, simulated): AttributeChange.__init__(self) self.simulated = simulated self.connected = simulated def connect(self): return self.connected def disconnect(self): pass