Ejemplo n.º 1
0
def main():

    session = Remote.new_session('[email protected]/rpc', '*****')

    thermostat = session.new_handler(ANY_ALL, Thermostat, 18)

    thermostat.wait_for_release()

    session.close()
Ejemplo n.º 2
0
def main():

    session = Remote.new_session('[email protected]/rpc', '*****')

    thermostat = session.new_handler(ANY_ALL, Thermostat, 18)

    thermostat.wait_for_release()

    session.close()
Ejemplo n.º 3
0
def main():

    session = Remote.new_session('[email protected]/rpc', '*****')

    thermostat = session.new_proxy('[email protected]/rpc', Thermostat)

    print("Current temperature is %s" % thermostat.get_temperature())

    thermostat.set_temperature(20)

    time.sleep(10)

    session.close()
Ejemplo n.º 4
0
def main():

    session = Remote.new_session('[email protected]/rpc', '*****')

    thermostat = session.new_proxy('[email protected]/rpc', Thermostat)

    print("Current temperature is %s" % thermostat.get_temperature())

    thermostat.set_temperature(20)

    time.sleep(10)

    session.close()
Ejemplo n.º 5
0
def main():

    session = Remote.new_session('[email protected]/rpc', '*****')

    session.new_handler(ANY_ALL, Boomerang)

    boomerang = session.new_proxy('[email protected]/rpc', Boomerang)

    callback = Future()

    boomerang.async(callback).throw()

    time.sleep(10)

    session.close()
Ejemplo n.º 6
0
def main():

    session = Remote.new_session('[email protected]/rpc', '*****')

    session.new_handler(ANY_ALL, Boomerang)

    boomerang = session.new_proxy('[email protected]/rpc', Boomerang)

    callback = Future()

    boomerang. async (callback).throw()

    time.sleep(10)

    session.close()