Hi @mariuslucianand and @paulvlase ,
In our application (S32K v4.2.0 with Matlab 2020a) , the controller sends identical CAN messages with different Message IDs depending on some external board configuration.
This functionality was realized using switch case action subsystems with many 'cases' (depending on the external configuration).
We see 2 problems here:
a) It's a very inconvenient and clumsy implementation that makes the model unnecessarily complex. It would be much more convenient, in such case, to have an external signal line for message ID or to be able to parameterize the ID in the FCAN_send block using a global parameter (which doesn't seem to be possible). Is there a better way (or maybe we don't understand something) ?
b) If the switch-case-action subsystems are not explicitly set to be 'inlined' or to be realized as 'nonreusable function' and the only difference between them is the message ID in the FCAN_send block - all the different drivers blocks are optimized out in the code generation process - producing single 'send' function with single/fixed ID. Is this intended behavior ?
What's Your thoughts on this ?
Thanks
Maciek