www.gusucode.com > robotsimulink 工具箱 matlab源码程序 > robotsimulink/robotslros/+robotics/+codertarget/+internal/onBuildEntryHook.m
function onBuildEntryHook(hCS) %This function is for internal use only. It may be removed in the future. %ONBUILDENTRYHOOK Entry hook point for code generation % Copyright 2014-2016 The MathWorks, Inc. % Check that target language is C++ and error out if it is not targetLang = getProp(hCS, 'TargetLang'); if ~strcmpi(targetLang, 'C++') error(message('robotics:robotslros:cgen:CppLanguageRequired', targetLang)); end % Check that PackageGeneratedCodeAndArtifacts and ERTFilePackagingFormat % are set appropriately. These parameters are disabled in onHardwareSelect % hook, but this only applies to new models; a user can open a model from a % older release that is configured for ROS target but with these parameters % editable val = getProp(hCS, 'PackageGeneratedCodeAndArtifacts'); if ~strcmpi(val, 'off') error(message('robotics:robotslros:cgen:PackNGoNotSupported')); end pkgFormat = getProp(hCS, 'ERTFilePackagingFormat'); if ~strcmpi(pkgFormat, 'modular') error(message('robotics:robotslros:cgen:ModularPackagingRequired', pkgFormat)); end end