⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rtdx.m

📁 这是一个关于MATLAB的函数
💻 M
字号:
function h = rtdx(bpnum)
%RTDX Construct RTDX(tm) (Real-Time Data Exchange) object.
%   R = RTDX(DSPTASK) returns a handle to an RTDX object constructed 
%   by inheriting the Code Composer Studio(tm) (CCS) API class 'DspTask' 
%   defined in the CCSDSP object.  The handle to 'DspTask' interface is 
%   traversed to get the 'Rtdx' class interface.  'Rtdx' handle is used to get 
%   handles to 'RtdxChannel' interfaces by the OPEN method.  This constructor 
%   defines the object properties data structure to store RTDX and RTDX channel
%   handles and other identifying attributes.
%   
%   BPNUM - 2 element Vector of board
%
%   Public read-only properties (use GET):
%   
%   .numChannels       number of open RTDX channels
%   .RtdxChannel{i,1}  channel name of i-th channel, 1 <= i <= numChannels
%   .RtdxChannel{i,3}  read/write mode ('w'/'r') of i-th channel
%   .procType          integer specifying DSP type (e.g., C62, C67, C54)
%
%   Public read/write properties (use GET/SET):
%
%   .timeOut           global time out value in seconds used for RTDX accesses
%
%   Private properties (no direct access to users):
%
%   .Rtdx              handle to ActiveX RtdxChannel sub-class
%   .RtdxChannel{i,2}  interface handle to i-th channel
%
%   Accesses to Texas Instruments(tm) (TI) CCS and target TI DSPs via RTDX are 
%   initiated by the instantiation of MATLAB objects of class CCSDSP and RTDX.  
%   Once the objects are constructed, various remote automation tasks may be 
%   performed by calling predefined object methods, which get, manage, and 
%   release necessary CCS API interfaces through Windows ActiveX.  The list of 
%   supported methods can be displayed typing "help rtdx" at the MATLAB command
%   command line.
%
%   See also @CCSDSP/CCSDSP

% Copyright 2001-2002 The MathWorks, Inc.
% $Revision: 1.35 $ $Date: 2002/06/12 15:30:13 $

% Construct the actual object instance and allocate required memory.
h = ccs.rtdx;

% Initialize default object properties
h.numChannels = 0;         % Number of open channels
h.timeout     = 10.0;      % Default timeout

if ~isa(bpnum,'double') & length(bpnum) ~= 2  ,
    error('Cannot create RTDX object without board and proc number ');
end
h.boardnum =  bpnum(1);
h.procnum  =  bpnum(2);

% Set channel properties to null char strings
%
% h.RtdxChannel{1,1} = '';       % Channel name
% h.RtdxChannel{1,2} = '';       % RTDX channel handle
% h.RtdxChannel{1,3} = '';       % Read/Write mode ('r' or 'w')
h.RtdxChannel = {'', [], ''};

% Link RTDX object with CCSDSP object.  Get RTDX handle by descending 
% CCSDSP class structure until sub-class Rtdx is reached.
%if nargin==2,
%    if isempty(dsptask),
%        error(['Cannot create RTDX object because DSPTASK object is not ' ...
%                'valid.']);
%    end
%    h.procType    = procType;  % Integer specifying DSP type
%    h.Rtdx = get(dsptask, 'rtdx');  % Get handle to Rtdx interface
%    h.Rtdx = [];  % Later

% [EOF]	rtdx.m

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -