winIDEA SDK
Loading...
Searching...
No Matches
plugin_controller.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
"""
This script demonstrates the use of the CPluginController.
Not all plugins are viable for such use.
"""
import isystem.connect as ic
winidea_id = ''
def main():
print('isystem.connect version: ' + ic.getModuleVersion())
connMgr = ic.ConnectionMgr()
connMgr.connect(ic.CConnectionConfig().instanceId(winidea_id))
# Plugin names can be found in the "View" dropdown menu.
pluginCtrl = ic.CPluginController(connMgr, "[TC399XE.CPU0] TriCore")
mpuViewName = "Counters"
# View names are the specific views (windows) that belong to a plugin.
if not pluginCtrl.is_open(mpuViewName):
pluginCtrl.open(mpuViewName)
pluginCtrl.refresh(mpuViewName)
viewContent = pluginCtrl.get_content(mpuViewName, "", ic.IntVector())
viewContentIter = viewContent.iterator()
for _ in range(viewContent.size()):
print(next(viewContentIter))
pluginCtrl.close(mpuViewName)
print("Example finished.")
if __name__ == '__main__':
main()