gusucode.com > vnt工具箱matlab源码程序 > vnt/vnt/+can/+peaksystem/+pcanbasic/ChannelInfo.m
classdef (Hidden) ChannelInfo < can.ChannelInfo % ChannelInfo Retrieve channel specific PEAK-System CAN device information. % % This class contains information pertaining to a specific channel on % a PEAK-System CAN device. This information includes data needed % to access and use the channel. % % See also VNT. % Authors: JDP % Copyright 2013 The MathWorks, Inc. properties (GetAccess = 'public', SetAccess = 'private') DeviceType end methods function obj = ChannelInfo(channelIndex) % ChannelInfo Construct an object containing information on a PEAK-System device channel. % Get all the channel information. chInfo = can.peaksystem.pcanbasic.Utility.getAllChannelInfo(); % Set the device name based on its type. device = chInfo(channelIndex).Handle; % Set the adjusted device channel index. deviceChannelIndex = chInfo(channelIndex).ControllerNumber; % Set the serial number. deviceSerialNumber = chInfo(channelIndex).SerialNumber; % Set the constructor string for this channel. objectConstructor = ['canChannel(''PEAK-System'', ''' device ''')']; % Call the superclass constructor. obj@can.ChannelInfo(... device,... deviceChannelIndex,... deviceSerialNumber,... objectConstructor); % Set the other properties. obj.DeviceType = chInfo(channelIndex).HardwareName; end end end