필터 지우기
필터 지우기

Central bus initialization in testsequence for multiple harnesses

조회 수: 2 (최근 30일)
Alexander
Alexander 2020년 8월 24일
답변: Devendra Bhave 2020년 11월 23일
Hello,
I would like to create a central bus initialization for all harnesses i use in my testmanager.
Normally the bus would be initialized in the test sequence:
Bus1.Signal1 = 0;
If i would like to change the initializiation of the bus, i would need to change every testsequnce in the harnesses.
Is there a general solution like
% test harness 1
Bus1 = InitializeBusFunction(Bus1);
% other central file
function [outputBus] = InitializeBusFunction(inputBus)
outputBus = inputBus;
outputBus.Signal1 = 2;
end
This creates an error "Read before write". So what are other possible solutions?
Thanks!

답변 (1개)

Devendra Bhave
Devendra Bhave 2020년 11월 23일
As per my understanding, you are expecting to call custom code before simulating the harness in Simulink Test Manager.
Simulink Test Manager offers a feature named ‘Callbacks’. These callbacks invoke custom code before/during/after running the tests. Please refer to the section “Callbacks” in the below MathWorks documentation page for more information: https://www.mathworks.com/help/sltest/ug/test-case-sections.html

카테고리

Help CenterFile Exchange에서 Test Model Components에 대해 자세히 알아보기

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by