12345678910111213141516171819202122232425262728293031 |
- include "primitives.alh"
- include "services.alh"
- include "modelling.alh"
- include "object_operations.alh"
- include "io.alh"
- Boolean function main(model : Element):
- String pdevs_client_taskname
- String the_output
- String the_input
- String devs_model
-
- pdevs_client_taskname = input()
- log("(PS) Got task name from console!")
- log(pdevs_client_taskname)
-
- while (True):
- if (has_input()):
- the_input = input()
- log("(PS) Got input from console!")
- log(cast_v2s(the_input))
- if (is_physical_string(the_input)):
- give_input_to_other(pdevs_client_taskname, the_input)
- else:
- give_input_to_other(pdevs_client_taskname, cast_v2s(the_input))
- if (other_has_output(pdevs_client_taskname)):
- the_output = get_output_from_other(pdevs_client_taskname)
- log("(PS) Got output from pdevs simulator!")
- log(the_output)
- output(the_output)
- sleep(0.05)
|