Commit 4124dd3d authored by Alexander Diewald's avatar Alexander Diewald
Browse files

DSE-SolConv: Add support for optional SuperSets in artifact containers

Issue-Ref: 3791
Issue-Url: https://af3-developer.fortiss.org/issues/3791

Signed-off-by: Alexander Diewald's avatarAlexander Diewald <diewald@fortiss.org>
parent 1c7b453c
DSEBackendService.java 6af7d976cfa9d49875dc3183b034c958b14d167f GREEN
DSESolutionExporterService.java e95a2cf64cfd02f1a046e28438bc4a431c3a9b8d YELLOW
DSESolutionExporterService.java 8d6a0e44e5dbd3bf75f56194f79bf3ff6c5aca1c YELLOW
......@@ -114,8 +114,8 @@ public class DSESolutionExporterService
@SuppressWarnings("unchecked") IDSESolutionConverter<O, I> converterCasted =
(IDSESolutionConverter<O, I>)converter;
@SuppressWarnings("unchecked") O result = converterCasted.transform(
(SuperSet<I>)solutionArtifacts.getSuperSetOrThrow(artifactType),
solutionArtifacts, baseName);
(SuperSet<I>)solutionArtifacts.getSuperSet(artifactType), solutionArtifacts,
baseName);
solutionArtifacts.addTransformedRootElement(result);
}
}
......
DSESolutionArtifacts.java 85584fe235366abad2652f985996e1fa0d560d23 YELLOW
DSESolutionArtifacts.java a90171c6adc6e522e328e1bb3b55ae4dac18f5e5 YELLOW
DSESolutionConversionContext.java d16e052e6c3b56b7e2ae21ffec97bd41df1d3d4d YELLOW
DSESolutionConverterBase.java ddfd79b2535b7242b39c331ba8a12ccc36155677 YELLOW
IDSESolutionConverter.java 4c3f3555b98c19d0642797a28de1d9bdd113ab5a YELLOW
RouteConverter.java b63f6c096b3c33595ff3d6225e294b894208b07e YELLOW
ScheduleConverter.java f2d1d0b9bd99e81f70155f99d5c0034ce922d964 YELLOW
ScheduleConverter.java 90a8bbcd6b936ea32d68692969e692a7605fa580 YELLOW
SignalToRouteConverter.java 0aac4963f9ae0f24814ccfb510a02c4ea84e1443 YELLOW
TaskToExecUnitConverter.java 2566b87947007df54a4cc96f71f066a944629d23 YELLOW
......@@ -79,7 +79,7 @@ public class DSESolutionArtifacts {
* type to search.
* @return the found {@link SuperSet}.
*/
public <T extends IModelElement> SuperSet<T> getSuperSetOrThrow(Class<T> seekType) {
public <T extends IModelElement> SuperSet<T> getSuperSet(Class<T> seekType) {
SuperSet<T> superSet = solutionMap.get(seekType);
if(superSet == null) {
throwConversionError(getConverterName(),
......@@ -88,6 +88,18 @@ public class DSESolutionArtifacts {
return superSet;
}
/**
* Extracts an optionally present {@link SuperSet} of the given {@code seekType} from the given
* {@link SuperSetMap}.
*
* @param seekType
* type to search.
* @return the found {@link SuperSet}, or null if no such {@link SuperSet} was found.
*/
public <T extends IModelElement> SuperSet<T> getOptionalSuperSet(Class<T> seekType) {
return solutionMap.get(seekType);
}
/**
* Extracts an {@link IProjectRootElement} from the internal set of elements available in the
* transformation.
......
......@@ -138,7 +138,7 @@ public class ScheduleConverter
// Possibly adds to the system schedule information about the frequencies.
SuperSet<ResourceSchedule> freqSchedules =
solArtifacts.getSuperSetOrThrow(ResourceSchedule.class);
solArtifacts.getOptionalSuperSet(ResourceSchedule.class);
if(freqSchedules != null) {
ResourceSchedule rsSolution =
getResourceSchedule(freqSchedules.getEntries(), allocResource);
......
PartitionChannelConverter.java de48bab1b37a658093ab18b20bc04f0179a67506 YELLOW
PartitionChannelConverter.java 52f517bab5060628c2b49d9100dbb807f1dd3c85 YELLOW
PartitionConverter.java 9e9861618e29cf0cbdcdbaae881ccca2538b1458 YELLOW
PartitionToExecutionUnitConverter.java e2b73759498f72277378cfaf1f37a3357742a671 YELLOW
TaskToPartitionConverter.java f71db1ef5488d48ef5e38b0e7c82bdff92d1d269 YELLOW
......@@ -64,7 +64,7 @@ public class PartitionChannelConverter
DSESolutionArtifacts solArtifacts, String baseName) {
PartitionArchitecture partArch =
solArtifacts.getElementOrThrow(PartitionArchitecture.class);
SuperSet<Signal> signalSet = solArtifacts.getSuperSetOrThrow(Signal.class);
SuperSet<Signal> signalSet = solArtifacts.getSuperSet(Signal.class);
AllocationTableCollection atc =
solArtifacts.getElementOrThrow(AllocationTableCollection.class);
TaskToPartitionAllocationTable taskPartAllocTable =
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment