winIDEA SDK
test_get_set_int_uint.py
1# This script is licensed under BSD License, see file LICENSE.txt.
2#
3# (c) TASKING Germany GmbH, 2023
4
5import isystem.connect as ic
6
7
8winidea_id = ''
9
10
11def test_getSetIntUint():
12 connMgr = ic.ConnectionMgr()
13 connMgr.connect(ic.CConnectionConfig().instanceId(winidea_id))
14
15 optCtrl = ic.COptionController(connMgr, "/IDE/System.Debug.Applications[0].SymbolFiles.File[0].Options")
16
17 value = optCtrl.get_int("CodeOffset")
18 print(f"Original value of 'SymbolFiles.File[0].Options.CodeOffset' attribute: {value}")
19
20 print(f"Setting new value (42)...")
21 optCtrl.set_uint("CodeOffset", 42)
22
23 print(f"Restoring original value ({value})...")
24 optCtrl.set_int("CodeOffset", value)
25
26 value = optCtrl.get_uint("CodeOffset")
27 print(f"Original value of 'SymbolFiles.File[0].Options.CodeOffset' attribute: {value}")
28
29
30if __name__ == "__main__":
31 test_getSetIntUint()