1
2
3
4
5import isystem.connect as ic
6
7def main():
8 print('isystem.connect version: ' + ic.getModuleVersion())
9
10 cmgr = ic.ConnectionMgr()
11 cfg = ic.CConnectionConfig()\
12 .workspace('../../../targetProjects/SampleSTM32.xjrf').start_if_required()
13 cmgr.connect(cfg)
14
15 ideCtrl = ic.CIDEController(cmgr)
16
17
18 inParams = ic.StrStrMap()
19 inParams['Dividend'] = '10'
20 inParams['Divisor'] = '2'
21
22 outParams = ideCtrl.invoke("/IDE/Divide", inParams)
23
24 print('Result as string: ', outParams)
25
26 print('Quotient = ', outParams['Quotient'])
27 print('Remainder = ', outParams['Remainder'])
28 outParams_d = dict(outParams)
29 print(outParams_d)
30 if outParams['ResultB']:
31 print('Result = ', outParams['ResultB'])
32
33
34 if int(outParams['Remainder']) == 0:
35 print('There is no remainder!')
36
37
38if __name__ == "__main__":
39 main()