How can I find where an interface is referenced in AUTOSAR Dictionary in Simulink R2024a?

10 visualizaciones (últimos 30 días)
In the AUTOSAR Dictionary, when I try to remove an interface that does not appear to be used elsewhere in the dictionary, I encounter this error:
"Unable to remove interface 'MY_INTERFACE'. One or more ports are referring to this interface"
How can I find where this interface is being used if I want to delete it?

Respuesta aceptada

MathWorks Support Team
MathWorks Support Team el 3 de Jul. de 2025
Editada: MathWorks Support Team el 9 de Jul. de 2025
One possible reason for this error is that the UI might not be up to date if the model has not been built yet.
To see "MY_INTERFACE" in the AUTOSAR Dictionary, build your model (Ctrl + B) to update the UI.
It is possible that "MY_INTERFACE" could be used by an existing Simulink Parameter. Perform the following steps to check this:
  1. Open the AUTOSAR Dictionary
  2. Click "Design Data"
  3. Select the Simulink Parameter
  4. Navigate to "Code Generation"
  5. Under "InterfacePath", observe if "MY_INTERFACE" interface is being referred to
Another possible reason for this error is that a reference to the interface exists within the AUTOSAR Properties, which cannot be accessed through the AUTOSAR Dictionary UI. If the above does not resolve the issue, or you do not have any External Data Sources, workspace variables, or SLDDs referenced in your model, there may be another reference to this interface which you can locate with commands similar to the ones below:
>> arProps = autosar.api.getAUTOSARProperties(bdroot); >> arProps.find([], "ParameterSenderPort")' >> arProps.delete("MY_INTERFACE")
The "find" function locates the Parameter Interface based on the type of AUTOSAR element you are interested in while the "delete" function removes this reference from the AUTOSAR properties.
Additionally, for recent MATLAB versions, MathWorks recommends migrating from using "AUTOSAR.Parameter" to using "Simulink.Parameter" objects and the code mapping workflow documented in this MATLAB Answers post.

Más respuestas (0)

Categorías

Más información sobre AUTOSAR Blockset en Help Center y File Exchange.

Productos


Versión

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by