FIFO Read HDRS
Libraries:
Simulink Real-Time /
RS232
Description
The FIFO Read HDRS block identifies and separates ASCII data streams that have embedded identifiers.
The data following a particular header can have varying lengths, but has a common
termination marker such as <CR><LF>
. Although you can
attain this same functionality with the FIFO Read block, it requires a
complicated state machine with this behavior:
If the same header arrives in the FIFO more than once after the block was last executed, the block returns the latest instance of the header. The block catches up with data that arrives faster than the block executes.
If a header arrives in the FIFO that does not match an item in the headers list, the block discards the message.
If bytes arrive in the FIFO that do not match a header, the block interprets the message as having an unspecified header. The block skips these bytes.
Example models slrt_ex_serialbaseboardasciitest
and
slrt_ex_serialbaseboardasciisplit
show how to use the FIFO
Read HDRS block. To find and open these models, in the MATLAB® Command Window, type:
modelfinder('slrealtime')
For more information, see RS-232 Serial Communication and RS-232 Legacy Drivers.
Examples
Ports
Input
Output
Parameters
Extended Capabilities
Version History
Introduced in R2020b