winIDEA SDK
Loading...
Searching...
No Matches
test_export_data.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 os
import time
import isystem.connect as ic
winidea_id = ''
def test_exportData():
connMgr = ic.ConnectionMgr()
connMgr.connect(ic.CConnectionConfig().instanceId(winidea_id))
traceCtrl = ic.CTraceController(connMgr, "sdk_example.trd", "w")
cfg = ic.CTraceExportConfig()
cfg.setFileName("test_exportData.bin")
fmt = ic.CTraceBinExportFormat()
cfg.setFormatter(fmt)
print("Exporting data in binary format...")
traceCtrl.exportData(cfg)
traceCtrl.close()
wksFolderPath = ic.CIDEController(connMgr).getPath(ic.CIDEController.WORKSPACE_DIR)
filePath = os.path.join(wksFolderPath, cfg.getFileName())
print(f"Expected file: {filePath}")
if __name__ == "__main__":
test_exportData()