Simulink coder packed structs

5 visualizaciones (últimos 30 días)
David
David el 4 de Abr. de 2014
Respondida: Mark McBroom el 29 de Mzo. de 2025
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 comentario
John
John el 26 de Mzo. de 2025
@David Did you ever figure out how to do this?

Iniciar sesión para comentar.

Respuestas (1)

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

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by