| 123456789101112131415161718192021222324 |
- from modelverse import *
- init()
- login("pdevs_sim_interface_acct", "my_password")
- def pdevs_sim_interface(port):
- # Set up Statechart, bind service to input event generation.
- # For output: set up listener to output port... But function has to return? Maybe (blocking?) polling function...
- def pdevs_sim(input):
- return
- service_set(port, pdevs_sim(service_get(port)))
-
- service_register("fibonacci", fibonacci_service)
- print("Registered")
- while raw_input() != "STOP":
- # Stay active, as we shouldn't exit while the service is running!
- pass
- print("Stopping")
- service_stop()
- print("Service halted")
|