function plc_ide_list = plc_custom_ide
%

%   Copyright 2012-2023 The MathWorks, Inc.

% Generic codegen config customization file for omron target

    plc_ide_list(1) = get_ide_info_omron;
end

function ide_info = get_ide_info_omron
    ide_info.name = 'omron';
    ide_info.description = 'OMRON Sysmac Studio';
    ide_info.path = ''; % IDE path
    ide_info.format = 'xml'; % generic|xml
    ide_info.fileExtension = 'xml';
    ide_info.cfg = get_ide_cfg_omron;
    ide_info.precg_callback = 'plc_precg_callback_omron';
    ide_info.postcg_callback = 'plc_postcg_callback_omron';
    ide_info.xmltree_callback = PLCCoder.PLCCGMgr.PLC_PLUGIN_CG_CALLBACK_EMPTY;
    ide_info.pluginVersion = 2.2;
    ide_info.compatibleBuildVersion = 1.6;
end

function cfg = get_ide_cfg_omron
    cfg.fConvertUnsignedIntToSignedInt = false;
    cfg.fConvertDoubleToSingle = false;
    cfg.fConvertNamedConstantToInteger = true;
    cfg.fConvertEnumToInteger = true;
    cfg.fInt16AsBaseInt = false;
    cfg.fConvertOutputInitValueToAssignment = true;
    cfg.fDefineFBExternalVariable = true;
    cfg.fConvertAggregateTypeFunctionToFB = true;
    cfg.fUseQualifiedTypeConstant = true;
    cfg.fConvertBooleanCast = true;
    cfg.fSimplifyOperatorNameList = {'SHL', 'SHR', 'ROL', 'ROR'};
    cfg.fSimplifyIntrinsicFcnNameList = {'MIN', 'MAX', 'SQRT'};
    cfg.fErrorOnTrailingUS = true;
    cfg.fHoistIntrinsicFcnCallNestedExpr = true;
    cfg.fRefactorInputAssignment = true;
    cfg.fEmitXsdSchema = 'none';
    cfg.fTargetKeywordHook = 'plc_omron_keyword_list';
end

% LocalWords:  omron Sysmac precg FB SHL SHR ROL ROR postcg
