Byte Unpacking
Deconstruct data frames
Libraries:
Simulink Real-Time /
Utilities
Description
The Byte Unpacking block converts a vector of varying data types into one or more signals of user-selectable data types. The input of this block typically connects to an output port of a Receive block.
The Byte Packing block and the Byte Unpacking block support Simulink® Real-Time™ STF code generation targets and generate code that runs on Speedgoat target machines. Due to considerations such as endianness and addressable word size, these blocks can generate incorrect results for other code generation targets or target computers.
For example, suppose that you are unpacking a uint8
vector signal
into three signals. The signals have these attributes:
Dimension | Size | Type |
---|---|---|
Scalar | 1 | single |
Vector | 3 | uint8 |
Vector | 3 | uint8 |
Set the output port data type to:
{'single', ['uint8'], ['uint8']}
Use square brackets to represent vectors.
Set the output port dimension to:
{[1],[3],[3]}
Set the alignment value to
1
.Connect the output signals to the Byte Unpacking block.
Examples
Ports
Input
Output
Parameters
Extended Capabilities
Version History
Introduced in R2006a