Component under test in test harness

조회 수: 7 (최근 30일)
Daniel
Daniel 2024년 3월 20일
답변: Udit06 2024년 3월 25일
Hello,
I want to take the component under test programatically:
is it possible? I started to use sltest.harness api but no clue as there is not possible to retrieve the component under test in my test harness model.
Thank you

답변 (1개)

Udit06
Udit06 2024년 3월 25일
Hi Daniel,
You can follow the following steps to programmatically retrieve the Component under Test.
1) Use sltest.harness.find to find the test harnesses associated with a particular model or block.
% Assuming 'modelPath' is the path to your model or the block you are interested in
harnesses = sltest.harness.find(modelPath);
harnesses is an array of structures. Each element in this array represents a test harness associated with the specified model or block, and the structure contains information about each harness.
You can use this array of structures to access the information about Component under Test. Please note that the struct itself does not directly contain a property with the name "Component under Test", but in my case the property "ownerFullPath" contains the same information as displayed under "Component under Test".
harnesses(2).ownerFullPath
I hope this helps.

카테고리

Help CenterFile Exchange에서 Inputs에 대해 자세히 알아보기

제품


릴리스

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by