Files
x07ma/script/local.py
2015-08-24 09:29:40 +02:00

36 lines
915 B
Python

###################################################################################################
# Deployment specific global definitions - executed after startup.py
###################################################################################################
#Uncomment this line to create the simulated devices needed to the tutorial scripts.
#run("tutorial/devices")
energy = None
class SimulatedEnergy(Writable):
def write(self, value):
self.put(value)
def put(self, value, timeout = None):
global energy
energy = value
def close(self):
pass
class SimulatedEnergyReadback(Readable):
def read(self):
global energy
return energy;
def get(self):
return self.read()
def close(self):
pass
sim_energy = SimulatedEnergy()
sim_energy_readback = SimulatedEnergyReadback()