Clear Filters
Clear Filters

[AUTOSAR] error "Unrecognized method, property, or field 'Type' for class 'Simulink.​metamodel.​arplatform​.interface​.Operation​'."

11 views (last 30 days)
Hi,
I am working on Adaptive AUTOSAR models, to establish an environment where Server and Client exchange data via AUTOSAR interface as below:
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?
  1 Comment
Ninad
Ninad on 8 Sep 2023
Edited: Ninad on 8 Sep 2023
Hi Wonjin,
Can you give me the steps you followed, that led to this error.
I will try to reproduce the issue on my end.

Sign in to comment.

Answers (1)

akshatsood
akshatsood on 12 Sep 2023
Edited: akshatsood on 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.

Categories

Find more on AUTOSAR Blockset in Help Center and File Exchange

Products


Release

R2023a

Community Treasure Hunt

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

Start Hunting!