Commit f0b4e03b authored by Nicola Gatto's avatar Nicola Gatto Committed by Evgeny Kusmenko
Browse files

Add update rate parameterin JSON and middleware

UpdateRate defines the time between two ticks
parent 04878161
...@@ -37,7 +37,7 @@ An example config file with all clustering algorithms: [config](src/test/resourc ...@@ -37,7 +37,7 @@ An example config file with all clustering algorithms: [config](src/test/resourc
| outputDir | String | ✅ | path to output directory for generated files | | outputDir | String | ✅ | path to output directory for generated files |
| rootModel | String | ✅ | fully qualified name of the root model | | rootModel | String | ✅ | fully qualified name of the root model |
| generators | List | ✅ | List of generator identfiers<br> 'cpp', 'emadlcpp', 'roscpp', 'rclcpp' | | generators | List | ✅ | List of generator identfiers<br> 'cpp', 'emadlcpp', 'roscpp', 'rclcpp' |
| emadlBackend | String | ❓ | deep-learning-framework backend<br> 'MXNET'(Default), 'CAFFE2' | | emadlBackend | String | ❓ | deep-learning-framework backend<br> 'MXNET'(Default), 'CAFFE2', 'GLUON' |
| writeTagFile | Bool | ❓ | Writes a .tag file with all Middleware tags into the generated code<br> Defaults to false | | writeTagFile | Bool | ❓ | Writes a .tag file with all Middleware tags into the generated code<br> Defaults to false |
| clusteringParameters | Object | ❓ | Options to cluster the component before generating<br> See below | | clusteringParameters | Object | ❓ | Options to cluster the component before generating<br> See below |
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<groupId>de.monticore.lang.monticar</groupId> <groupId>de.monticore.lang.monticar</groupId>
<artifactId>embedded-montiarc-math-middleware-generator</artifactId> <artifactId>embedded-montiarc-math-middleware-generator</artifactId>
<version>0.0.25-SNAPSHOT</version> <version>0.0.26-SNAPSHOT</version>
<!-- == PROJECT DEPENDENCIES ============================================= --> <!-- == PROJECT DEPENDENCIES ============================================= -->
...@@ -23,8 +23,8 @@ ...@@ -23,8 +23,8 @@
<embedded-montiarc.version>0.1.9-SNAPSHOT</embedded-montiarc.version> <embedded-montiarc.version>0.1.9-SNAPSHOT</embedded-montiarc.version>
<Embedded-montiarc-math-generator.version>0.1.12-SNAPSHOT</Embedded-montiarc-math-generator.version> <Embedded-montiarc-math-generator.version>0.1.12-SNAPSHOT</Embedded-montiarc-math-generator.version>
<Embedded-montiarc-math-roscpp-generator.version>0.1.6-SNAPSHOT</Embedded-montiarc-math-roscpp-generator.version> <Embedded-montiarc-math-roscpp-generator.version>0.1.6-SNAPSHOT</Embedded-montiarc-math-roscpp-generator.version>
<EMADL2CPP.version>0.2.8</EMADL2CPP.version> <EMADL2CPP.version>0.3.5-SNAPSHOT</EMADL2CPP.version>
<EMADL.version>0.2.7-SNAPSHOT</EMADL.version> <EMADL.version>0.2.8-SNAPSHOT</EMADL.version>
<embedded-montiarc-component-clustering.version>0.0.2-SNAPSHOT</embedded-montiarc-component-clustering.version> <embedded-montiarc-component-clustering.version>0.0.2-SNAPSHOT</embedded-montiarc-component-clustering.version>
<!-- .. Libraries .................................................. --> <!-- .. Libraries .................................................. -->
......
...@@ -56,5 +56,4 @@ public class CliParameters { ...@@ -56,5 +56,4 @@ public class CliParameters {
public Optional<ClusteringParameters> getClusteringParameters() { public Optional<ClusteringParameters> getClusteringParameters() {
return Optional.ofNullable(clusteringParameters); return Optional.ofNullable(clusteringParameters);
} }
} }
...@@ -11,9 +11,7 @@ import de.se_rwth.commons.logging.Log; ...@@ -11,9 +11,7 @@ import de.se_rwth.commons.logging.Log;
import java.io.File; import java.io.File;
import java.io.IOException; import java.io.IOException;
import java.util.ArrayList; import java.util.*;
import java.util.List;
import java.util.Optional;
public class EMADLGeneratorImpl implements GeneratorImpl { public class EMADLGeneratorImpl implements GeneratorImpl {
private String generationTargetPath; private String generationTargetPath;
...@@ -37,7 +35,8 @@ public class EMADLGeneratorImpl implements GeneratorImpl { ...@@ -37,7 +35,8 @@ public class EMADLGeneratorImpl implements GeneratorImpl {
List<File> files = new ArrayList<>(); List<File> files = new ArrayList<>();
emadlGenerator.setGenerationTargetPath(generationTargetPath); emadlGenerator.setGenerationTargetPath(generationTargetPath);
List<FileContent> fileContents = emadlGenerator.generateStrings(taggingResolver, componentInstanceSymbol, taggingResolver); List<FileContent> fileContents = emadlGenerator.generateStrings(taggingResolver, componentInstanceSymbol,
taggingResolver, new HashSet<>(), "n");
for (FileContent fileContent : fileContents) { for (FileContent fileContent : fileContents) {
files.add(emadlGenerator.getEmamGen().generateFile(fileContent)); files.add(emadlGenerator.getEmamGen().generateFile(fileContent));
......
...@@ -11,6 +11,7 @@ import de.monticore.lang.monticar.emadl.generator.EMADLAbstractSymtab; ...@@ -11,6 +11,7 @@ import de.monticore.lang.monticar.emadl.generator.EMADLAbstractSymtab;
import de.monticore.lang.monticar.generator.middleware.impls.*; import de.monticore.lang.monticar.generator.middleware.impls.*;
import de.monticore.lang.monticar.generator.roscpp.helper.TagHelper; import de.monticore.lang.monticar.generator.roscpp.helper.TagHelper;
import de.monticore.lang.tagging._symboltable.TaggingResolver; import de.monticore.lang.tagging._symboltable.TaggingResolver;
import de.se_rwth.commons.logging.Finding;
import de.se_rwth.commons.logging.Log; import de.se_rwth.commons.logging.Log;
import freemarker.template.TemplateException; import freemarker.template.TemplateException;
import org.junit.Before; import org.junit.Before;
...@@ -299,7 +300,7 @@ public class GenerationTest extends AbstractSymtabTest { ...@@ -299,7 +300,7 @@ public class GenerationTest extends AbstractSymtabTest {
middlewareGenerator.add(new RosCppGenImpl(), "roscpp"); middlewareGenerator.add(new RosCppGenImpl(), "roscpp");
middlewareGenerator.generate(componentInstanceSymbol, taggingResolver); middlewareGenerator.generate(componentInstanceSymbol, taggingResolver);
assertTrue(Log.getFindings().isEmpty()); assertTrue(Log.getFindings().stream().filter(Finding::isError).collect(Collectors.toList()).isEmpty());
} }
@Test @Test
......
...@@ -186,5 +186,4 @@ public class ParameterLoadingTest { ...@@ -186,5 +186,4 @@ public class ParameterLoadingTest {
Log.enableFailQuick(true); Log.enableFailQuick(true);
} }
} }
...@@ -35,6 +35,6 @@ component ResNet34{ ...@@ -35,6 +35,6 @@ component ResNet34{
GlobalPooling(pool_type="avg") -> GlobalPooling(pool_type="avg") ->
FullyConnected(units=1000) -> FullyConnected(units=1000) ->
Softmax() -> Softmax() ->
predictions predictions;
} }
} }
\ No newline at end of file
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