How can I import structures from C and use them as bus elements in a .sldd dictionnary?
Mostra commenti meno recenti
Hi,
I would like to import structures from a C header and then export them in a .sldd dictionnary linked to a static library, and use them as bus elements in custom busses used in the library.
I have used Simulink.importExternalCTypes to import the structures into my workspace without issue. I then opened my dictionnary through Simulink.data.dictionary.open and exported my structures into the dictionnary with importFromBaseWorkspace before closing the dictionnary with Simulink.data.dictionary.close, and everything went fine. I can see my structures imported as busses in the dictionnary, I can use them and use my custom busses in my library.
However, once I tried to add my imported structure as a bus element to a custom bus in my dictionnary, I had a lot of compilation errors which I do not understand. Moreover, the bus editor won't let me save my dictionnary when I try to remove the bus element which causes the issue, which means the bus element comes back when I refresh the editor.
Please find below a screenshot of the compilation errors
Is there a way to export those structures and use them as bus editors? If not, what alternatives do I have to get a similar result? I would like for it all to be static and usable directly in a static library, without having to import all of it in my workspace everytime I want to work on my library
Thank you in advance.

Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Block Libraries in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!