MATLAB 帮助中心
设置回调函数,使其在到目标计算机的连接状态发生变化时触发。
自 R2022b 起
setTargetConnectionStatusCallback(callback)
setTargetConnectionStatusCallback(callback) 在目标计算机的连接状态发生变化时触发回调。
callback
示例
全部折叠
使用以下函数显示目标连接的状态,其中 status 是目标连接状态的变化。
status
function targetConnectionCallback(status) if status disp('Target connected'); else disp('Target disconnected'); end end tg.setTargetConnectionStatusCallback(@targetConnectionCallback);
function
提供一个函数,其中包含在目标的连接状态发生变化时要执行的必要操作。该回调函数应具有 1 个输入参量,该参量表示连接状态。
在 R2022b 中推出
Linux Runtime Manager | setApplicationStateCallback | startApplication
Linux Runtime Manager
setApplicationStateCallback
startApplication
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
选择网站
选择网站以获取翻译的可用内容,以及查看当地活动和优惠。根据您的位置,我们建议您选择:。
您也可以从以下列表中选择网站:
如何获得最佳网站性能
选择中国网站(中文或英文)以获得最佳网站性能。其他 MathWorks 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
欧洲
亚太
联系您当地的办事处