📄 msgcount.m
字号:
function num = msgcount(r, channelName)
%MSGCOUNT Get number of messages in specified 'read' configured channel queue.
% MSGCOUNT(R, CHANNEL) returns an integer value denoting the number of data
% messages in the 'read' configured RDTX(tm) channel queue specified by the
% string CHANNEL, and as defined in the RTDX object R. This method does not
% work for channels configured for 'write' operation.
% Copyright 2001-2002 The MathWorks, Inc.
% $Revision: 1.13 $ $Date: 2002/06/12 15:30:17 $
if ~ischar(channelName),
error('Channel name must be a character string.');
return
elseif isempty(channelName),
error('Channel name cannot be an empty string.');
return
end
% Look for specified channel name
chID = strmatch(channelName, {r.RtdxChannel{:,1}}, 'exact');
if isempty(chID),
error('Specified channel is not open.');
end
num = ccsmexswitchyard([110,r.boardnum,r.procnum,0,0],channelName);
% [EOF] msgcount.m
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -