classdef (Hidden = true) AutosarCodeInterfaceFactory < rtw.pil.CodeInterfaceFactory
%AUTOSARCODEINTERFACEFACTORY Factory for SIL/PIL AUTOSAR code interface objects
%
% This is an undocumented class. Its methods and properties are likely to
% change without warning from one release to the next.

% Copyright 2010-2019 The MathWorks, Inc.

methods

function codeInfoUtils = createCodeInfoUtils(~, ...
codeInfoPath, clientInterface, configInterface, componentName, runValidation)
codeInfoUtils = coder.connectivity.AutosarCodeInfoUtils( ...
codeInfoPath, clientInterface, configInterface, componentName, runValidation);
end

function silPILWrapperUtils = createSILPILWrapperUtils(~, ...
silPILInterface, ...
infoStruct, ...
clientInterface,...
topModelOriginalParams, ...
lXilCompInfo)
if silPILInterface.isModelBlockXIL
silPILWrapperUtils = rtw.pil.ModelRefSILPILWrapperUtils(...
silPILInterface, ...
infoStruct, ...
clientInterface,...
topModelOriginalParams, ...
lXilCompInfo);
else
silPILWrapperUtils = rtw.pil.StandaloneSILPILWrapperUtils(...
silPILInterface, ...
infoStruct, ...
clientInterface, ...
[], ...
lXilCompInfo);
end
end

function hostSfun = createHostSfunction(this, ...
silPILWrapperUtils, ...
sfunSourcePath, ...
sfunBinDir) %#ok<INUSL>
if silPILWrapperUtils.getSILPILInterface.isModelBlockXIL
hostSfun = rtw.pil.ModelBlockSfunction(silPILWrapperUtils, ....
sfunSourcePath, ...
sfunBinDir);
else
hostSfun = rtw.pil.AutosarSfunction(silPILWrapperUtils, ....
sfunSourcePath, ...
sfunBinDir);
end
end

function targetInterface = createTargetInterface(~, ...
silPILWrapperUtils, ...
pilInterfaceTarget)
targetInterface = rtw.pil.AutosarTargetInterface(silPILWrapperUtils, ...
pilInterfaceTarget);
end
end
end