winIDEA SDK
Loading...
Searching...
No Matches
invoke.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():
winidea_id = ''
print('isystem.connect version: ' + ic.getModuleVersion())
cmgr = ic.ConnectionMgr()
cmgr.connect(ic.CConnectionConfig().instanceId(winidea_id))
ideCtrl = ic.CIDEController(cmgr)
inParams = {}
inParams['Dividend'] = '10'
inParams['Divisor'] = '2'
result = ideCtrl.invoke("/IDE/Divide", inParams)
print('Result as mapping: ', result)
print('Quotient = ', result['Quotient'])
print('Remainder = ', result['Remainder'])
if 'ResultB' in result:
print('Result = ', result['ResultB'])
# use 'int' or 'float' built-in functions to get numeric values.
if int(result['Remainder']) == 0:
print('There is no remainder!')
if __name__ == "__main__":
main()