Simulink coder packed structs

5 ビュー (過去 30 日間)
David
David 2014 年 4 月 4 日
回答済み: Mark McBroom 2025 年 3 月 29 日
Hello, is there a way to have the Simulink autocoder turn bus objects into packed structs (byte alignment=1)? E.g., the struct definition might look like:
struct __attribute__((__packed__)) mystruct_A {
char a;
int b;
char c;
};
Thanks!
  1 件のコメント
John
John 2025 年 3 月 26 日
@David Did you ever figure out how to do this?

サインインしてコメントする。

回答 (1 件)

Mark McBroom
Mark McBroom 2025 年 3 月 29 日
See the "Alignment" property for Simulink.Bus elements defined here: https://www.mathworks.com/help/simulink/slref/simulink.bus.html
Thanks.
Mark.

カテゴリ

Help Center および File ExchangeSimulink Coder についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by