function plc_ide_list = plc_custom_ide
%   Copyright 2012-2018 The MathWorks, Inc.
    plc_ide_list(1) = get_ide_info_ge;
end

function ide_info = get_ide_info_ge
    ide_info.name = 'ge';
    ide_info.description = 'GE Proficy Machine Edition 7.0';
    ide_info.path = ''; % IDE path
    ide_info.format = 'xml'; % generic|xml
    ide_info.fileExtension = 'xml';
    ide_info.cfg = get_ide_cfg_ge;
    ide_info.precg_callback = PLCCoder.PLCCGMgr.PLC_PLUGIN_CG_CALLBACK_EMPTY; 
    ide_info.postcg_callback = PLCCoder.PLCCGMgr.PLC_PLUGIN_CG_CALLBACK_EMPTY;
    ide_info.xmltree_callback = PLCCoder.PLCCGMgr.PLC_PLUGIN_CG_CALLBACK_EMPTY;
    ide_info.pluginVersion = 2.0;
    ide_info.compatibleBuildVersion = 1.5;
end

function cfg = get_ide_cfg_ge
    cfg.fConvertUnsignedIntToSignedInt = true;
    cfg.fConvertDoubleToSingle = true; % GE has LREAL for newer models
    cfg.fConvertNamedConstantToInteger = true;
    cfg.fConvertEnumToInteger = true;
%    cfg.fInt16AsBaseInt = true;
    cfg.fInt32AsBaseInt = true; % int_to_dint not supported
end

% LocalWords:  LREAL Proficy
