1 """script test to simulate a closed loop
4 closed_loop.py <parameters_filename> [options]
6 with 'parameters_filename' the path to the parameters file
9 -h --help Show this help message and exit
10 --brahma Distribute data with brahma
11 --bench For a timed call
12 -d, --devices devices Specify the devices
15 from docopt
import docopt
20 arguments = docopt(__doc__)
21 param_file = arguments[
"<parameters_filename>"]
31 sim = shesha_sim.BenchBrahma(param_file)
32 sim.config.p_controller0.set_type(ControllerType.GENERIC)
34 if arguments[
"--devices"]:
36 for k
in range(len(arguments[
"--devices"])):
37 devices.append(int(arguments[
"--devices"][k]))
38 sim.config.p_loop.set_devices(devices)
41 sim.loop(monitoring_freq=100)