www.gusucode.com > vnt工具箱matlab源码程序 > vnt/vnt/+can/VendorInfo.m

    classdef (Hidden) VendorInfo < matlab.mixin.Heterogeneous & hgsetget
% VendorInfo Retrieve vendor specific CAN device information.
%
%   The VendorInfo class contains information on CAN devices on a per 
%   vendor basis. VendorInfo also contains child classes for each 
%   identified CAN device channel.
%
%   See also VNT.
%

% Authors: JDP
% Copyright 2007-2010 The MathWorks, Inc.

    properties (GetAccess = 'public', SetAccess = 'private') 
        % VendorName - The name of the device vendors.
        VendorName
        % VendorDriverDescription - The name of the interface API or
        %   library used to connect with the vendor's devices.
        VendorDriverDescription
        % VendorDriverVersion - The version of the vendor's driver
        %   currently installed.
        VendorDriverVersion
        % ChannelInfo - Stores information on available device channels.
        ChannelInfo
    end

    
    methods
        
        function obj = VendorInfo(name, driverDesc, driverVer, chanInfo)
        % VendorInfo Construct an object containing CAN vendor information.
        %
        %   OBJ = VendorInfo(NAME, DRIVERDESC, DRIVERVER, CHANINFO)
        %   creates a VendorInfo object.
        %
        %   Inputs:
        %       NAME - Name of the vendor.
        %       DRIVERDESC - Name of the vendor's driver.
        %       DRIVERVER - Version of the vendor's driver.
        %       CHANINFO - Vector of CHANNELINFO objects.
        %
        
            % Set the properties.
            obj.VendorName = name;
            obj.VendorDriverDescription = driverDesc;
            obj.VendorDriverVersion = driverVer;
            obj.ChannelInfo = chanInfo;
        end
        
    end

    methods (Static, Sealed, Access = 'protected')

        function defaultObject = getDefaultScalarElement()
        % getDefaultScalarElement Return a base object of the class type.
        %
        %   This method is used internally to satisfy the requirements for
        %   use of heterogeneous arrays. Is creates a blank version of the
        %   class to be used for array manipulation.
        %
        
            defaultObject = can.VendorInfo([], [], [], []);
        end
        
    end
    
end