www.gusucode.com > vnt工具箱matlab源码程序 > vnt/vnt/+can/+ni/+xnet/VendorInfo.m
classdef (Hidden) VendorInfo < can.VendorInfo % VendorInfo Retrieve NI-XNET device information. % % The VendorInfo class contains information on NI-XNET devices. It % also contains child classes for each identified CAN device channel. % % See also VNT. % Authors: JDP % Copyright 2013 The MathWorks, Inc. methods function obj = VendorInfo() % VendorInfo Construct an object containing information on NI-XNET devices. % Set the name of the vendor. vendorName = 'NI'; % Set the driver interface description. vendorDriverDescription = 'NI-XNET'; % Get the driver version information. vendorDriverVersion = can.ni.xnet.Utility.getDriverVersion(); % Initialize a ChannelInfo object as empty. channelInfo = can.ni.xnet.ChannelInfo.empty(); % Loop through the channel count and create channel information % objects for each. for index = 1:can.ni.xnet.Utility.getNumberOfChannels() % Create a child class for this channel. Adjust the channel % index to be zero based. channelInfo(index) = can.ni.xnet.ChannelInfo(index); end % Call the superclass constructor. obj@can.VendorInfo(... vendorName,... vendorDriverDescription,... vendorDriverVersion,... channelInfo); end function display(obj) % display Display array. % Display is overridden to prevent the 'var =' screen print in % general and especially for invalid objects. disp(obj); end end end