winIDEA SDK
Loading...
Searching...
No Matches
test_create_config_item.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_createConfigItem():
connMgr = ic.ConnectionMgr()
connMgr.connect(ic.CConnectionConfig().instanceId(winidea_id))
addCtrl = ic.CAddressController(connMgr)
daqCfgs = ic.DAQConfigVector()
print("Adding DAQ area by address.size...")
symInfo = addCtrl.getSymbolInfo(ic.IConnectDebug.fRealTime, "mainLoopCounter")
cfg1 = ic.CDAQConfigItem(symInfo.getSizeMAUs(),
symInfo.getMemArea(),
symInfo.getAddress(),
ic.CDAQController.daqSampleMax,
0,
0)
daqCfgs.push_back(cfg1)
print("Adding DAQ area by variable name...")
cfg2 = ic.CDAQConfigItem("mainLoopCounter",
ic.CDAQController.daqSampleMax,
0,
0)
daqCfgs.push_back(cfg2)
print("Adding DAQ area by program counter (PC) value...")
cfg3 = ic.CDAQConfigItem("0x00027000", # "0x12345678"
ic.CDAQController.daqSampleMax,
0,
0)
daqCfgs.push_back(cfg3)
if __name__ == "__main__":
test_createConfigItem()