function obj = canDatabase(file)
% canDatabase Parses a DBC file for CAN and CAN FD networks.
%
%   OBJ = canDatabase(DBC_FILE) creates an DBC file objct OBJ linked to the
%   specified DBC_FILE. DBC_FILE may be specified as a full or 
%   relative path or as only a file name. By default, MATLAB looks for 
%   DBC_FILE on the MATLAB path. Database files supported are Vector 
%   CANdb (DBC) files.
%
%   Example:
%       candbObj = canDatabase('myFile.dbc');
%
%   See also VNT.

% Copyright 2008-2018 The MathWorks, Inc.

% Perform an argument count check.
narginchk(1, 1);

% Convert string inputs to character vectors.
file = convertStringsToChars(file);

% Validate the file input.
[~, ~, fileFullPath] = can.validateCANdbFile(file);

% Pass the call through to the CAN database file manager.
obj = can.DatabaseManager.getInstance.find(fileFullPath);
end
