Protocol Encoder
Encode input data into a uint8 byte stream by specifying the packet structure
Since R2023b
Libraries:
Simulink Real-Time /
Utilities
Description
The Protocol Encoder block encodes input data into a uint8 byte stream as per the specified packet structure based on the communication protocol. You can use this block to encode the separate fields into a packet, by specifying the header, terminator, name of packet fields in sequence and their size. You can also generate checksum bytes for the packet for validating the packet. These figures show how the Protocol Encoder and Protocol Decoder can simplify serial communications.
Simple Serial Communication without Encoder and Decoder Blocks
Simple Serial Communication with Encoder and Decoder Blocks
Ports
Input
Output
Parameters
Extended Capabilities
Version History
Introduced in R2023b