[AUTOSAR] error "Unrecognized method, property, or field 'Type' for class 'Simulink.metamodel.arplatform.interface.Operation'."
8 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi,
I am working on Adaptive AUTOSAR models, to establish an environment where Server and Client exchange data via AUTOSAR interface as below:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1439298/image.jpeg)
I checked "Run" is OK, but when I generate code, I have the following error at Client side build. The error message is new to me and I am not sure where to look. Could you please provide any guidance where I should look?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1439303/image.jpeg)
1 Kommentar
Antworten (1)
akshatsood
am 12 Sep. 2023
Bearbeitet: akshatsood
am 12 Sep. 2023
Hi Wonjin,
I understand that you are working on adaptive AUTOSAR models to establish an environment. While generating code, you are encountering an error at the client-side build.
At this point, I am assuming that you might have defined a server port to have the same qualified path as the application component while configuring packages. To resolve this, it would be helpful to rename the server port in the AUTOSAR dictionary to make it distinguishable. Further, I would recommend reviewing the packages to make sure the application component has a unique qualified name.
Another possible reason for the error could be related to issues with component models. It is important to note that if you build two component models and their component.arxml files have identical UUIDs, conflicts may arise. This situation often occurs when you clone a model on a disk and rename it in the AUTOSAR dictionary. However, this approach can be cumbersome and may lead to errors. To avoid such conflicts, it is recommended to follow a different approach. Starting with a clean AUTOSAR model template is one option, ensuring that each component has a unique UUID. Alternatively, you can use the autosar.api.delete(bdroot,'default') or autosar.api.create(bdroot,'default') commands to configure a newly created AUTOSAR component. These commands help ensure that the component has a fresh configuration and avoids any potential UUID conflicts.
You can leverage the following code to re-link the components to resolve the composition error.
model = systemcomposer.loadModel('<MODEL NAME>');
linkedComps = find_system('<MODEL NAME>', 'BlockType', 'ModelReference');
for i = 1:length(linkedComps)
linkedComp = linkedComps{i};
disp(['Processing: ' linkedComp])
comp = model.lookup('Path', linkedComp); % inline the component
refName = comp.ReferenceName;
comp.inlineComponent(false);
comp = model.lookup('Path', linkedComp); % relink to the simulink model
comp.linkToModel(refName);
end
If the issue persists, it would be helpful if you could share your ARXML file. This would allow me to have a better understanding of the case and provide more accurate assistance.
I hope this helps.
0 Kommentare
Siehe auch
Kategorien
Mehr zu AUTOSAR Blockset finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!