9import isystem.connect
as ic
16 connMgr = ic.ConnectionMgr()
17 connMgr.connect(ic.CConnectionConfig().instanceId(winidea_id))
19 execCtrl = ic.CExecutionController(connMgr)
20 sessCtrl = ic.CSessionCtrl(connMgr)
21 sessCtrl.begin_program()
23 execCtrl.runUntilFunction(
'main')
24 execCtrl.waitUntilStopped()
26 print(
"Executing function 'timesTwo' via `call()` method...")
27 retVal = execCtrl.call(
"timesTwo",
"12")
28 print(f
"\tReturn value: {retVal}")
29 print(f
"\tFunction prototpe: 'int timesTwo(int num)'")
31 print(
"Executing function 'returnSmaller' via `call()` method...")
32 retVal = execCtrl.call(
"returnSmaller",
"123",
"456")
33 print(f
"\tReturn value: {retVal}")
34 print(f
"\tFunction prototype: 'int returnSmaller(int a, int b)'")
36 print(
"Executing function 'getNumber' via `call()` method...")
37 retVal = execCtrl.call(
"getNumber")
38 print(f
"\tReturn value: {retVal}")
39 print(f
"\tFunction prototype: 'int getNumber(void)'")
42 params = ic.StrVector()
46 params.push_back(
'6000')
47 params.push_back(
'1.62')
48 params.push_back(
'2.4')
50 print(
'sumDifferentTypes(4, 5, 6, 6000, 1.62, 2.4) = ',
51 int(execCtrl.call(
'sumDifferentTypes', params), 0))
54if __name__ ==
"__main__":