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

11 次查看(过去 30 天)
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 个)

akshatsood
akshatsood 2023-9-12
编辑:akshatsood 2023-9-12
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.

类别

Help CenterFile Exchange 中查找有关 AUTOSAR Blockset 的更多信息

产品


版本

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by