function plc_ide_list = plc_custom_ide
%

%   Copyright 2012-2022 The MathWorks, Inc.

% Generic codegen config customization file for pilz target

    plc_ide_list(1) = get_ide_info_pilz;
end

function ide_info = get_ide_info_pilz
    ide_info.name = 'pilz';
    ide_info.description = 'PILZ PAS4000 1.7';
    ide_info.path = ''; % IDE path
    ide_info.format = 'generic'; % generic|xml
    ide_info.fileExtension = 'st'; 
    ide_info.cfg = get_ide_cfg_pilz;
    ide_info.precg_callback = 'plc_precg_callback_pilz'; 
    ide_info.postcg_callback = 'plc_postcg_callback_pilz';
    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_pilz
    cfg.fConvertNamedConstantToInteger = true;
    cfg.fConvertEnumToInteger = true;
    cfg.fConvertAggregateInitValueToAssignment = true;
    cfg.fUseQualifiedTypeConstant = true;
    cfg.fRemovessMethod = true;
    cfg.fSimplifyAllIntrinsicFcn = true;
    cfg.fSimplifyOperatorNameList = {'SHL', 'SHR', 'ROL', 'ROR'};    
end

% LocalWords:  pilz postcg Proficy LREAL omron Sysmac precg FB SHL SHR ROL ROR
% LocalWords:  keba Ke Iec
