...
 
Commits (5)
......@@ -10,7 +10,7 @@
<groupId>de.monticore.lang.monticar</groupId>
<artifactId>embedded-montiarc-math-middleware-generator</artifactId>
<version>0.0.31-SNAPSHOT</version>
<version>0.0.32-SNAPSHOT</version>
<!-- == PROJECT DEPENDENCIES ============================================= -->
......@@ -25,7 +25,7 @@
<Embedded-montiarc-math-roscpp-generator.version>0.1.8-SNAPSHOT</Embedded-montiarc-math-roscpp-generator.version>
<EMADL2CPP.version>0.3.6-SNAPSHOT</EMADL2CPP.version>
<EMADL.version>0.2.10-SNAPSHOT</EMADL.version>
<SOMEIP.version>1.2-SNAPSHOT</SOMEIP.version>
<SOMEIP.version>1.3-SNAPSHOT</SOMEIP.version>
<MQTT.version>1.5-SNAPSHOT</MQTT.version>
<embedded-montiarc-component-clustering.version>0.0.2-SNAPSHOT</embedded-montiarc-component-clustering.version>
......
package de.monticore.lang.monticar.generator.middleware;
import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.cncModel.EMAPortSymbol;
import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.instanceStructure.EMAComponentInstanceSymbol;
import de.monticore.lang.embeddedmontiarc.tagging.middleware.someip.SomeIPToEmamTagSchema;
import de.monticore.lang.embeddedmontiarc.tagging.middleware.someip.SomeIPConnectionSymbol;
import de.monticore.lang.monticar.generator.middleware.impls.CPPGenImpl;
import de.monticore.lang.monticar.generator.someip.GeneratorSomeIP;
import de.monticore.lang.monticar.generator.middleware.impls.SomeIPGenImpl;
import de.monticore.lang.monticar.generator.someip.helper.SomeIPTagHelper;
import de.monticore.lang.tagging._symboltable.TagSymbol;
import de.monticore.lang.tagging._symboltable.TaggingResolver;
import org.junit.Test;
import java.io.File;
import java.io.IOException;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import static org.junit.Assert.assertNotNull;
......@@ -28,7 +21,7 @@ public class SomeIPGenerationTest extends AbstractSymtabTest {
@Test
public void testSomeIPGeneration() throws IOException {
TaggingResolver taggingResolver = createSymTabAndTaggingResolver(TEST_PATH);
EMAComponentInstanceSymbol componentInstanceSymbol = taggingResolver.<EMAComponentInstanceSymbol>resolve("tests.a.addComp", EMAComponentInstanceSymbol.KIND).orElse(null);
EMAComponentInstanceSymbol componentInstanceSymbol = taggingResolver.<EMAComponentInstanceSymbol>resolve("tests.someip.testComp", EMAComponentInstanceSymbol.KIND).orElse(null);
SomeIPToEmamTagSchema.registerTagTypes(taggingResolver);
assertNotNull(componentInstanceSymbol);
......@@ -36,7 +29,7 @@ public class SomeIPGenerationTest extends AbstractSymtabTest {
SomeIPTagHelper.resolveTags(taggingResolver, componentInstanceSymbol);
DistributedTargetGenerator distributedTargetGenerator = new DistributedTargetGenerator();
distributedTargetGenerator.setGenerationTargetPath(OUT_BASE + "addComp/src");
distributedTargetGenerator.setGenerationTargetPath(OUT_BASE + "compA/src");
distributedTargetGenerator.add(new CPPGenImpl(TEST_PATH),"cpp");
distributedTargetGenerator.add(new SomeIPGenImpl(), "someip");
......
package tests.someip;
conforms to de.monticore.lang.embeddedmontiarc.tagging.middleware.someip.SomeIPToEmamTagSchema;
tags Test {
tag testComp.in1 with SomeIPConnection = {serviceID = 11, instanceID = 12, eventgroupID = 13};
tag testComp.in2 with SomeIPConnection = {serviceID = 21, instanceID = 22, eventgroupID = 23};
tag testComp.in3 with SomeIPConnection = {serviceID = 31, instanceID = 32, eventgroupID = 33};
tag testComp.in4 with SomeIPConnection = {serviceID = 41, instanceID = 42, eventgroupID = 43};
tag testComp.out1 with SomeIPConnection = {serviceID = 111, instanceID = 112, eventgroupID = 113};
tag testComp.out2 with SomeIPConnection = {serviceID = 121, instanceID = 122, eventgroupID = 123};
tag testComp.out3 with SomeIPConnection = {serviceID = 131, instanceID = 132, eventgroupID = 133};
tag testComp.out4 with SomeIPConnection = {serviceID = 141, instanceID = 142, eventgroupID = 143};
}
package tests.someip;
component TestComp{
ports in Q in1,
in N in2,
in Z in3,
in B in4,
out Q out1,
out N out2,
out Z out3,
out B out4;
}
\ No newline at end of file