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