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.
The matlab/toolbox/slrealtime/examples
folder
contains examples that show how to use the FIFO Read HDRS block:
slrt_ex_serialbaseboardasciitest
and
slrt_ex_serialbaseboardasciisplit
.
Examples
Ports
Input
Output
Parameters
Extended Capabilities
Version History
Introduced in R2020b