winIDEA SDK
Loading...
Searching...
No Matches
test_get_option.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
winidea_id = ''
def test_getOption():
connMgr = ic.ConnectionMgr()
connMgr.connect(ic.CConnectionConfig().instanceId(winidea_id))
ideCtrl = ic.CIDEController(connMgr)
baseUrl = "Data.FNet.FixedFNode[0].Cfg.DIO[0].Cfg"
url = f"{baseUrl}.Group"
print(f"DIO cfg group (integer): {ideCtrl.getOptionInt(ic.ofDestIOPEN, '', url)}")
# OR ideCtrl.getOptionInt(fullUrl)
url = f"{baseUrl}.Bank[0].Voltage"
print(f"DIO cfg voltage (float): {ideCtrl.getOptionFloat(ic.ofDestIOPEN, '', url)}")
# OR ideCtrl.getOptionFloat(fullUrl)
url = f"{baseUrl}.Bank[0].Direction"
print(f"DIO cfg direction (string): {ideCtrl.getOptionStr(ic.ofDestIOPEN, '', url)}")
# OR ideCtrl.getOptionStr(fullUrl)
if __name__ == "__main__":
test_getOption()