Skip to content
Success

Changes

Summary

  1. Fix SEC generation with nested dynamic SECs (details)
Commit f07c96dcd2cfc4e6ad09769858d5f3a9af427eba by saadia dhouib
Fix SEC generation with nested dynamic SECs

BaSyx is stupid ... :/

In BaSyx you have several options how to add elements to a submodel
element collection. The option which the code generator uses doesn't
work when you add dynamic SECs to another SEC. That's because BaSyx is
doing some transformations on the Collection<ISubmodelElement> we're
passing into the setValue() method and these transformations trip over
BaSyx' very own lambda handler feature.

What this change does is replace the call to
.setValue(Collection<ISubmodelElement>) with a call to
.setElements(Map<String, Object>), which doesn't do any transformations.
The collection is manually converted into a Map<String, Object>.

Change-Id: I448bdcb7193562a779f24cf502f09c52daf1416d
Signed-off-by: Moritz Marseu <moritz.marseu@festo.com>
The file was modified aas/plugins/codegen/org.eclipse.aas.basyx.codegen/src/org/eclipse/aas/basyx/codegen/generator/submodel/SubModelCreator.java
The file was modified aas/plugins/codegen/org.eclipse.aas.basyx.codegen/src/org/eclipse/aas/basyx/codegen/generator/submodel/submodelelements/SECGenerator.java