import isystem.connect as ic
winidea_id = ''
def test_getSourceLocation():
connMgr = ic.ConnectionMgr()
connMgr.connect(ic.CConnectionConfig().instanceId(winidea_id))
addCtrl = ic.CAddressController(connMgr)
search_criteria = ic.CLineDescription(ic.CLineDescription.E_RESOURCE_FUNCTION,
"main",
0,
True,
0,
ic.CLineDescription.E_SEARCH_CODE,
ic.CLineDescription.E_MATCH_PLAIN,
"SoCInit",
0)
line_location = addCtrl.getSourceLocation(search_criteria)
msg = f"Location of function call SoCInit(): "
msg += f"{line_location.getFileName()}::{line_location.getLineNumber()}'"
print(msg)
if __name__ == "__main__":
test_getSourceLocation()