gusucode.com > vnt工具箱matlab源码程序 > vnt/vntblks/vntmasks/private/privatevntslxcpvalidatemodel.m
function errMsg = privatevntslxcpvalidatemodel % PRIVATEVNTSLXCPVALIDATEMODEL Validate a XCP Model pertaining to blocks % owned by Vehicle Network Toolbox. % Initialize error. errMsg = ''; blkh = gcbh; % Check for no device selected. device = get_param(blkh, 'Device'); if strcmpi(device, 'Select a device') error(message('vnt:vntblks:noDeviceSelected', gcb)); end % Check if the configuration block exists. out = find_system(bdroot, 'LookUnderMasks', 'all', 'MaskType', 'XCP Configuration', 'TLID', '1'); if isempty(out) % The XCP Configuration block has been deleted. error(message('vnt:vntblks:noXCPConfig')); end