winIDEA SDK
Loading...
Searching...
No Matches
test_execution_control.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 isystem.connect as ic
winidea_id = ''
def test_executionControl():
connMgr = ic.ConnectionMgr()
connMgr.connect(ic.CConnectionConfig().instanceId(winidea_id))
trdFilePath = "sdk_example.trd"
covCtrl = ic.CCoverageController2(connMgr, trdFilePath, "u")
covCtrl.waitUntilLoaded(5000, isThrow=True)
covCtrl.abort()
print("Loading of a really large file can be interrupted with '.abort()' method.")
print("\tDoes not really have effect here, since we have created a new empty document.")
covCtrl.start()
print(f"Analyzer started: {covCtrl.isActive()}")
print(f"Data acquisition in progress, analyzer is busy: {covCtrl.isBusy()}")
covCtrl.stopSampling()
print(f"Data acquisition stopped.")
covCtrl.stopUploading()
print(f"Uploading data to PC forcibly stopped.")
covCtrl.stopAnalyzing()
print(f"Data analysis forcibly stopped.")
covCtrl.resume()
print(f"Analyzer resumed: {covCtrl.isActive()}")
covCtrl.stop()
status = covCtrl.waitUntilLoaded(2000)
print(f"All analyzer data is loaded: {status}")
covCtrl.start1()
print(f"Analyzer can be reconfigured and restarted for post analysis.")
covCtrl.stop()
covCtrl.setDirty(True)
print(f"Analyzer document state set to 'dirty'.")
covCtrl.stopLoadingOrSaving()
covCtrl.closeAll()
if __name__ == "__main__":
test_executionControl()