本页面提供的是上一版软件的文档。当前版本中已删除对应的英文页面。
can.ChannelInfo
(不推荐)显示设备通道信息
不推荐使用 can.ChannelInfo
,它将在以后的版本中删除。请改用 canChannelList
。请参阅兼容性注意事项。
说明
ChannelInfo
对象显示指定 CAN 通道的信息。
创建对象
描述
vendor.ChannelInfo(
显示具有指定 index
)index
的设备供应商的通道信息。使用 CAN.VendorInfo
获取供应商信息。
输入参数
index
— 设备通道索引
数值
设备通道索引,指定为数值。
属性
Device
— CAN 设备名称
字符
设备的名称。
DeviceChannelIndex
— 通道索引编号
数值
指定的设备通道的索引编号。
DeviceSerialNumber
— CAN 设备序列号
数值
指定的设备的序列号。
ObjectConstructor
— 用于创建 CAN 通道的函数
字符
有关如何使用此设备构造 CAN 通道对象的信息。
示例
检查 Kvaser 设备通道信息
获取有关已安装的 CAN 设备的信息。
info = canHWInfo
info = CAN Devices Detected Vendor | Device | Channel | Serial Number | Constructor ------ | --------- | ------- | ------------- | ------------------------------------ Kvaser | Virtual 1 | 1 | 0 | canChannel('Kvaser', 'Virtual 1', 1) Kvaser | Virtual 1 | 2 | 0 | canChannel('Kvaser', 'Virtual 1', 2) Vector | Virtual 1 | 1 | 0 | canChannel('Vector', 'Virtual 1', 1) Vector | Virtual 1 | 2 | 0 | canChannel('Vector', 'Virtual 1', 2)
将 Kvaser 设备信息保存在对象中。
vendor = info.VendorInfo(1);
获取有关指定设备的第一个通道的信息。
vendor.ChannelInfo(1)
ans = ChannelInfo with properties: Device: 'Virtual 1' DeviceChannelIndex: 1 DeviceSerialNumber: 0 ObjectConstructor: 'canChannel('Kvaser', 'Virtual 1', 1)'
版本历史记录
在 R2009a 中推出R2017b: 要删除的函数
不推荐使用 can.ChannelInfo
,它将在以后的版本中删除。请改用 canChannelList
。
MATLAB 命令
您点击的链接对应于以下 MATLAB 命令:
请在 MATLAB 命令行窗口中直接输入以执行命令。Web 浏览器不支持 MATLAB 命令。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)