l_on.share(str(on)) # RUN ------------------------------------------------------------------------- def wakeup(): """The node starts functioning""" l_boiler.wakeup() def loop(): """The body of the node code""" l_boiler.loop() def sleep(): """The node is stopping""" l_boiler.sleep() # MAIN ----------------------------------------------------------------- # Use this to run the boiler node standalone if __name__ == "__main__": import sys me = (L_BOILER_NODE, sys.modules[__name__]) AppRunner.run(me) # END
on = False l_on.share(str(on)) # RUN ------------------------------------------------------------------------- def wakeup(): """The node starts functioning""" l_boiler.wakeup() def loop(): """The body of the node code""" l_boiler.loop() def sleep(): """The node is stopping""" l_boiler.sleep() # MAIN ----------------------------------------------------------------- # Use this to run the boiler node standalone if __name__ == "__main__": import sys me = (L_BOILER_NODE, sys.modules[__name__]) AppRunner.run(me) # END
# __main__.py 01/12/2014 D.J.Whale from IoticLabs.VirtualSpace import AppRunner import garden import house import boiler # Must now start garden as a normal process APPS = [ # ("garden", garden), ("house", house), ("boiler", boiler) ] print("*" * 80) print("*" * 80) AppRunner.runAll(APPS, rate=0.5, debug=False) # END