duration = -1,
mode = 'none'):
- if not mode in ['none', 'gdb', 'valgrind', 'json', 'yaml','pkt']:
+ if not mode in ['none', 'gdb', 'valgrind', 'json', 'yaml','pkt','native']:
raise STLArgumentError('mode', mode)
# listify
elif mode == 'pkt':
print STLProfile(stream_list).dump_as_pkt();
return
+ elif mode == 'native':
+ print STLProfile(stream_list).dump_to_code()
+ return
# start simulation
action = "store_true",
default = False)
+ group.add_argument("--native",
+ help = "generate Python code with stateless profile from input file [default is False]",
+ action = "store_true",
+ default = False)
+
return parser
mode = 'json'
elif options.yaml:
mode = 'yaml'
+ elif options.native:
+ mode = 'native'
elif options.pkt:
mode = 'pkt'
else: