Info
此问题已关闭。 请重新打开它进行编辑或回答。
Struct from nonvirtuell Bus
2 次查看(过去 30 天)
显示 更早的评论
Hello,
I wrote a Matlab System to communicate via a UART interface of the Raspberry Pi. I call the C-functions from the Matalb System with the coder.ceval command. The pidata_parse C-function returns the Data from the UART. For the In- and Ouput of the Matlab System I'm using a nonvirtuell Bus. out is the Name of the ouput.
If I try to do the following
out = coder.ceval(pidata_parse .....)
Matlab tells me to pre-initialsize the output. So I did the following:
out = struct{'a',0,'b',0 etc}
which works fine. Note: My Output will always be some kind of struct.
Evertime I change the Data thats coming in, I have to open up the System and change the strcut aswell as the definition of the nonvituell Bus. Is it somehow possible to create the struct depending on the entries of the Bus, so I only have to change the Bus setup ?.
Since I'm using the Support Package for Raspberry Pi I can't use the Simulink.Bus.createMATLABStruct command.
Thank you in advance Michael
0 个评论
回答(0 个)
此问题已关闭。
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!