5import isystem.connect
as ic
12 connMgr = ic.ConnectionMgr()
13 connMgr.connect(ic.CConnectionConfig().instanceId(winidea_id))
15 dataCtrl = ic.CDataController(connMgr)
17 print(f
"Modify variable 'g_int' to value '1'...")
18 dataCtrl.modify(ic.IConnectDebug.fRealTime,
"g_int",
"1",
False)
19 print(f
"Modify variable 'g_int' to value '2', with read-back...")
20 value = dataCtrl.modify(ic.IConnectDebug.fRealTime,
"g_int",
"2",
True)
21 print(f
"\tRead-back value: {value}")
23 print(f
"Optionally, modify variable 'g_int' to value '3' by variable type...")
25 sType.m_byType = ic.SType.tUnsigned
26 sType.m_byBitSize = 32
27 cVal = ic.CValueType(sType, 3)
28 dataCtrl.modify(ic.IConnectDebug.fRealTime,
"g_int", cVal)
30 print(f
"`modify() is also capable of handling expressions...")
34 dataCtrl.modify(ic.IConnectDebug.fRealTime,
35 ic.IConnectDebug.efAllowTernaryOperator,
37 "(g_int == g_char) ? 4 : 5")
38 value = dataCtrl.evaluate(ic.IConnectDebug.fRealTime,
"g_int").getInt()
39 print(f
"\t`(g_int == g_char)` = {value} (4 == True, 5 == False)")
42if __name__ ==
"__main__":