Main Content

이 페이지는 기계 번역을 사용하여 번역되었습니다. 영어 원문을 보려면 여기를 클릭하십시오.

Advisor.authoring.CustomCheck.checkCallback

모델 구성 확인을 위한 확인 콜백 등록

구문

Advisor.authoring.CustomCheck.checkCallback(system, CheckObj)

설명

Advisor.authoring.CustomCheck.checkCallback(system, CheckObj)은 검사 동작을 지정하기 위해 XML 데이터 파일을 사용하는 사용자 정의 검사를 등록할 때 검사 콜백 함수로 사용됩니다.

예제

다음 예에서 sl_customization.m 파일은 Advisor.authoring.CustomCheck.checkCallback(system)을 사용하여 구성 매개변수 확인을 등록합니다.

function defineModelAdvisorChecks
    
    rec = ModelAdvisor.Check('com.mathworks.Check1');
    rec.Title = 'Test: Check1';
    rec.setCallbackFcn(@(system)(Advisor.authoring.CustomCheck.checkCallback(system)), …
            'None', 'StyleOne');
    rec.TitleTips = 'Example check for check authoring infrastructure.';
    
    % --- data file input parameters
    rec.setInputParametersLayoutGrid([1 1]);
    inputParam1 = ModelAdvisor.InputParameter;
    inputParam1.Name = 'Data File';
    inputParam1.Value = 'Check1.xml';
    inputParam1.Type = 'String';
    inputParam1.Description = 'Name or full path of XML data file.';
    inputParam1.setRowSpan([1 1]);
    inputParam1.setColSpan([1 1]);
    rec.setInputParameters({inputParam1});

    % -- set fix operation
    act = ModelAdvisor.Action; 
    act.setCallbackFcn(@(task)(Advisor.authoring.CustomCheck.actionCallback(task)));
    act.Name = 'Modify Settings';
    act.Description = 'Modify model configuration settings.';
    rec.setAction(act);
    
    mdladvRoot = ModelAdvisor.Root;
    mdladvRoot.register(rec);
end