User`s guide
readmsg
Purpose Read messages from specified RTDX channel
Note Support for readmsg on C5000 and C6000 processors will be
removed in a future version.
Syntax data = readmsg(rx,channelname,'datatype',siz,nummsgs,timeout)
data = readmsg(rx,channelname,'datatype',siz,nummsgs)
data = readmsg(rx,channelname,datatype,siz)
data = readmsg(rx,channelname,datatype,nummsgs)
data = readmsg(rx,channelname,datatype)
Description data = readmsg(rx,channelname,'datatype',siz,nummsgs,timeout)
reads nummsgs from a channel associated with rx. channelname
identifies the channel queue, which must be configured for read access.
Eachmessageisthesametype,defined by
datatype. nummsgs can b e
an integer that defines the number of messages to read from the
specified queue, or
all to read all the messages present in the queue
when you call the
readmsg function.
Each read message becomes an output matrix in
data,withdimensions
specified by the elements in vector
siz. For example, when siz is [mn],
reading 10 messages (
nummsgs equal 10) creates 10 m-by-n matrices
in
data.Eachoutputmatrixindata must have the same number of
elements (
m x n) as the number of elements in each message.
You must specify the type of messages you are reading by including the
datatype argument. datatype supports strings that d efine the type of
data you are expecting, as shown in the following table.
datatype String Specified Data Type
'double'
Floating point data, 64-bits
(double-precision).
'int16'
Signed 16-bit integer dat a.
'int32'
Signed 32-bit integers.
7-123