winIDEA SDK
Loading...
Searching...
No Matches
service_call.py
# This script is licensed under BSD License, see file LICENSE.txt, or search for `License` in the SDK online help.
#
# (c) TASKING Germany GmbH, 2023
import isystem.connect as ic
def main():
print('isystem.connect version: ' + ic.getModuleVersion())
cmgr = ic.ConnectionMgr()
cfg = ic.CConnectionConfig()\
.workspace('../../../targetProjects/SampleSTM32.xjrf').start_if_required()
cmgr.connect(cfg)
ideCtrl = ic.CIDEController(cmgr)
# example with mappings
inParams = ic.StrStrMap()
inParams['Dividend'] = '10'
inParams['Divisor'] = '2'
outParams = ideCtrl.invoke("/IDE/Divide", inParams)
print('Result as string: ', outParams)
print('Quotient = ', outParams['Quotient'])
print('Remainder = ', outParams['Remainder'])
outParams_d = dict(outParams)
print(outParams_d)
if outParams['ResultB']:
print('Result = ', outParams['ResultB'])
# use 'int' or 'float' built-in functions to get numeric values.
if int(outParams['Remainder']) == 0:
print('There is no remainder!')
if __name__ == "__main__":
main()