5import isystem.connect
as ic
12 connMgr = ic.ConnectionMgr()
13 connMgr.connect(ic.CConnectionConfig().instanceId(winidea_id))
15 profCtrl = ic.CProfilerController2(connMgr,
"test_addItems.trd",
"w")
17 print(
"Adding 'main_loop_counter' variable in 'regular' mode...")
18 index = profCtrl.addVariable(0,
20 ic.CProfilerController2.EDATRegular)
21 print(f
"\tDone, index: {index}")
23 print(
"Adding 'g_int' variable in 'state' mode...")
24 index = profCtrl.addStateVariable(0,
26 ic.CProfilerController2.EStateDefEnum,
28 print(f
"\tDone, index: {index}")
30 print(
"Adding trace messages in 'regular' data mode...")
31 index = profCtrl.addTraceMessage(0,
33 ic.CProfilerController2.EDATRegular,
34 ic.CProfilerController2.ESingleData)
35 print(f
"\tDone, index: {index}")
37 print(
"Adding function 'main'...")
38 index = profCtrl.addFunction(0,
"main",
False)
39 print(f
"\tDone, index: {index}")
41 print(
"Adding multiple functions 'main'...")
42 functions = ic.StrVector()
43 functions.append(
"target_init")
44 functions.append(
"get_random")
45 profCtrl.addFunctions(0, functions)
48if __name__ ==
"__main__":