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 CenterFile Exchange에서 Simulink Coder에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by