Can I programmatically add data access to AUTOSAR runnables?
9 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
MathWorks Support Team
el 9 de Dic. de 2020
Respondida: MathWorks Support Team
el 10 de Dic. de 2020
I have a subsystem with grounded inports and outports. However, I would still like for the interface generated for this subsystem to reflect data read access for the inports and write access for the outports. However, I observe the following ARXML:
<RUNNABLE-ENTITY UUID="cedfa0d7-2958-5e82-9d63-c7b2b8ccd7f4">
<SHORT-NAME>demoReport_step</SHORT-NAME>
<MINIMUM-START-INTERVAL>0</MINIMUM-START-INTERVAL>
<CAN-BE-INVOKED-CONCURRENTLY>false</CAN-BE-INVOKED-CONCURRENTLY>
<SYMBOL>demoReport_step</SYMBOL>
</RUNNABLE-ENTITY>
And the following interface in the corresponding Rte header:
#define Rte_IWrite_demoReport_init_ProvidePortF_ProvidePortF Rte_IWrite_demoReport_demoReport_init_ProvidePortF_ProvidePortF
void Rte_IWrite_demoReport_init_ProvidePortF_ProvidePortF(const myBus* u);
#define Rte_IWriteRef_demoReport_init_ProvidePortF_ProvidePortF Rte_IWriteRef_demoReport_demoReport_init_ProvidePortF_ProvidePortF
myBus* Rte_IWriteRef_demoReport_init_ProvidePortF_ProvidePortF(void);
Is it possible to prevent Simulink from optimizing away the grounded inports and outports? Is it possible to programmatically add the data access specification for these ports?
Respuesta aceptada
MathWorks Support Team
el 9 de Dic. de 2020
There is currently no way to prevent the optimization of grounded inports and outports in generated ARXML. There is also no way to programmatically add the data access during code generation. However, one workaround is as follows:
Add "dummy" logic signals between the inports and outports. For example, a simple passthrough of the input signals. This will prevent the optimization removing these ports, since they are now in use. This would require editing the generated code after the fact to switch the logic from the simple passthrough to the desired behavior.
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre AUTOSAR Blockset en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!