MATLAB 帮助中心
断开与服务器模块的连接
disconnect(xcpch)
disconnect(xcpch) 断开指定的 XCP 通道与服务器模块的连接。断开通道连接会停止通道与服务器模块之间的活动报文传输。
xcpch
示例
全部折叠
使用 CAN 模块创建一个 XCP 通道,连接该通道,然后断开它与指定服务器模块的连接。
链接 A2L 文件
a2l = xcpA2L('XCPSIM.a2l')
使用 Vector CAN 模块虚拟通道创建一个 XCP 通道。检查通道是否已连接。
xcpch = xcpChannel(a2lfile,'CAN','Vector','Virtual 1',1);
连接通道并验证其连接。
connect(xcpch) isConnected(xcpch)
ans = 1
断开通道连接并检查连接是否处于活动状态。
disconnect(xcpch) isConnected(xcpch)
ans = 0
XCP 通道,指定为使用 xcpChannel 创建的 XCP 通道对象。随后,该 XCP 通道对象可以与 A2L 文件定义的指定服务器模块通信。
xcpChannel
在 R2013a 中推出
xcpA2L | xcpChannel | connect | isConnected
xcpA2L
connect
isConnected
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 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
欧洲
亚太
联系您当地的办事处