Commit 04878161 authored by Bernhard Rumpe's avatar Bernhard Rumpe
Browse files

BR-sy

parent beebefcd
Pipeline #175149 failed with stages
in 12 minutes and 49 seconds

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.
# (c) https://github.com/MontiCore/monticore
stages:
- windows
- linuxCompile
......
<!-- (c) https://github.com/MontiCore/monticore -->
# Dependencies needed to compile the generated projects
## Note
The generator creates compile scripts for all supported compilers. A project with ROS or ROS2 contains `compile.sh` and `compileMsbuild.bat` as Linux and Windows(with Msbuild) are supported.
......
<!-- (c) https://github.com/MontiCore/monticore -->
# Quickstart guide for generator developers
- Download and install Java(8+), Maven, as well as Git.
- Clone this repository:
......@@ -21,4 +22,4 @@
## Compiling the Projects
Options
1. Add your new generated test projects to the integration tests(check the scripts in [src/test/bash/](src/test/bash/) as well as [.gitlab-ci.yml](.gitlab-ci.yml)) and let the CI/CD system compile them. Alternatively you can use Docker to run the integration tests locally(reference [README.md](README.md) , Section 'Running the Integration tests locally')
2. Install all dependencies (reference [README.md](README.md) , Section 'Dependencies needed to compile the generated projects') and execute the generated compile scripts.
\ No newline at end of file
2. Install all dependencies (reference [README.md](README.md) , Section 'Dependencies needed to compile the generated projects') and execute the generated compile scripts.
<!-- (c) https://github.com/MontiCore/monticore -->
# Quickstart guide for generator users
- Download the latest version of the generator from the [se-nexus](https://nexus.se.rwth-aachen.de/service/rest/repository/browse/public/de/monticore/lang/monticar/embedded-montiarc-math-middleware-generator/) (e.g. .../0.0.20-20190311.154342-1/embedded-montiarc-math-middleware-generator-0.0.20-20190311.154342-1-jar-with-dependencies.jar) and save it as mw-generator.jar
- Create a `project.json` config file for your project
......@@ -25,4 +26,4 @@ call substCompileMingw.bat
For two example Projects using this generator see:
- [Cooperative Intersection](https://git.rwth-aachen.de/monticore/EmbeddedMontiArc/applications/cooperativeintersection) (Uses EMAM, ROS, CoInCar Simulator)
- [Autonomous driving](https://git.rwth-aachen.de/autonomousdriving/torcs_dl) (Uses EMADL, ROS, Torcs Simulator)
\ No newline at end of file
- [Autonomous driving](https://git.rwth-aachen.de/autonomousdriving/torcs_dl) (Uses EMADL, ROS, Torcs Simulator)
<!-- (c) https://github.com/MontiCore/monticore -->
# EMAM2Middleware
![pipeline](https://git.rwth-aachen.de/monticore/EmbeddedMontiArc/generators/EMAM2Middleware/badges/master/build.svg)
![coverage](https://git.rwth-aachen.de/monticore/EmbeddedMontiArc/generators/EMAM2Middleware/badges/master/coverage.svg)
......@@ -146,4 +147,4 @@ Run the tests by executing [dockerLocalIntegrationTestRos.sh](src/test/bash/dock
```bash
sudo src/test/bash/dockerLocalIntegrationTestRos.sh
sudo src/test/bash/dockerLocalIntegrationTestRos2.sh
```
\ No newline at end of file
```
<!-- (c) https://github.com/MontiCore/monticore -->
# Adding a new middleware generator
## EmbeddedMontiArc
......
<!-- (c) https://github.com/MontiCore/monticore -->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
......
<?xml version="1.0" encoding="UTF-8"?>
<!-- (c) https://github.com/MontiCore/monticore -->
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
......@@ -83,4 +84,4 @@
<activeProfiles>
<activeProfile>se-nexus</activeProfile>
</activeProfiles>
</settings>
\ No newline at end of file
</settings>
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.middleware;
import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.instanceStructure.EMAComponentInstanceSymbol;
......
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.middleware;
import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.instanceStructure.EMAComponentInstanceSymbol;
......
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.middleware;
import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.instanceStructure.EMAComponentInstanceSymbol;
......
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.middleware;
import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.instanceStructure.EMAComponentInstanceSymbol;
......
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.middleware.cli;
import java.util.Optional;
......
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.middleware.cli;
import com.google.gson.*;
......
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.middleware.cli;
import de.monticore.lang.monticar.clustering.cli.algorithms.AlgorithmCliParameters;
......
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.middleware.cli;
import com.google.gson.Gson;
......
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.middleware.cli;
public enum ResultChoosingStrategy {
......
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.middleware.cli;
import com.google.gson.*;
......
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.middleware.helpers;
import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.cncModel.EMAConnectorSymbol;
......
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.middleware.helpers;
import de.monticore.lang.monticar.generator.FileContent;
......
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.middleware.helpers;
public class NameHelper {
......
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.middleware.helpers;
import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.instanceStructure.EMAComponentInstanceSymbol;
......
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.middleware.helpers;
import de.se_rwth.commons.logging.Log;
......
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.middleware.impls;
import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.instanceStructure.EMAComponentInstanceSymbol;
......
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.middleware.impls;
import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.instanceStructure.EMAComponentInstanceSymbol;
......
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.middleware.impls;
import de.monticore.lang.embeddedmontiarc.tagging.middleware.MiddlewareSymbol;
......
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.middleware.impls;
import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.instanceStructure.EMAComponentInstanceSymbol;
......
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.middleware.impls;
import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.instanceStructure.EMAComponentInstanceSymbol;
......
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.middleware.impls;
import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.instanceStructure.EMAComponentInstanceSymbol;
......
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.middleware.impls;
import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.instanceStructure.EMAComponentInstanceSymbol;
......
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.middleware.impls;
import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.instanceStructure.EMAComponentInstanceSymbol;
......
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.middleware.impls;
import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.instanceStructure.EMAComponentInstanceSymbol;
......
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.middleware.impls;
import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.instanceStructure.EMAComponentInstanceSymbol;
......
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.middleware.impls;
import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.instanceStructure.EMAComponentInstanceSymbol;
......
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.middleware.templates;
import de.monticore.lang.monticar.generator.middleware.templates.compile.BashCompilationGenerator;
......
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.middleware.templates.compile;
......
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.middleware.templates.compile;
import de.monticore.lang.monticar.generator.FileContent;
......
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.middleware.templates.compile;
import de.monticore.lang.monticar.generator.middleware.templates.MiddlewareTemplates;
......
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.middleware.templates.compile;
import de.monticore.lang.monticar.generator.middleware.templates.MiddlewareTemplates;
......
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.middleware.templates.compile;
import de.monticore.lang.monticar.generator.FileContent;
......
<#-- (c) https://github.com/MontiCore/monticore -->
#pragma once
#include "${compName}.h"
......
<#-- (c) https://github.com/MontiCore/monticore -->
<#-- General batch -->
<#macro comment str>
:: ${str}
......@@ -34,4 +35,4 @@ IF NOT %ERRORLEVEL% EQU 0 (
</#if>
@echo off
<#include "compile.general.ftl"/>
\ No newline at end of file
<#include "compile.general.ftl"/>
<#-- (c) https://github.com/MontiCore/monticore -->
<#macro cmake subdir="">
<@comment str="configure cmake"/>
cmake -B<@evalCurDir postfix="build/${subdir}"/> -H<@evalCurDir postfix="src/${subdir}"/> -DCMAKE_INSTALL_PREFIX=<@evalCurDir postfix="install"/> <@generatorOption/> <@passParams/>
......@@ -36,4 +37,4 @@ popd
<@cmake subdir="comps"/>
<#else>
<@cmake/>
</#if>
\ No newline at end of file
</#if>
<#-- (c) https://github.com/MontiCore/monticore -->
#!/usr/bin/env bash
set -e
export CMAKE_PREFIX_PATH=$AMENT_PREFIX_PATH:$CMAKE_PREFIX_PATH
......@@ -36,4 +37,4 @@ fi
</#macro>
<#macro generatorOption></#macro>
<#include "compile.general.ftl"/>
\ No newline at end of file
<#include "compile.general.ftl"/>
<#-- (c) https://github.com/MontiCore/monticore -->
cmake_minimum_required(VERSION 3.5)
project (Coordinator_${compName} LANGUAGES CXX)
......@@ -15,4 +16,4 @@ target_include_directories(Coordinator_${compName} PUBLIC ${CMAKE_CURRENT_SOURCE
export(TARGETS Coordinator_${compName} IAdapter_${compName} FILE Coordinator_${compName}.cmake)
install(TARGETS Coordinator_${compName} DESTINATION bin)
\ No newline at end of file
install(TARGETS Coordinator_${compName} DESTINATION bin)
<#-- (c) https://github.com/MontiCore/monticore -->
#include <iostream>
#include <thread>
#include <chrono>
......@@ -78,4 +79,4 @@ int main(int argc, char* argv[])
}
return 0;
}
\ No newline at end of file
}
<#-- (c) https://github.com/MontiCore/monticore -->
#pragma once
#include "${compName}.h"
#include <thread>
......
<#-- (c) https://github.com/MontiCore/monticore -->
cmake_minimum_required(VERSION 3.5)
project (DummyAdapter_${compName})
......
<#-- (c) https://github.com/MontiCore/monticore -->
@echo off
:: Substituting the current dir with a drive letter to bypass windows path length limit
:: Set environment variable EMA_SUBST_LETTER to change letter is used
......@@ -20,4 +21,4 @@ cd /d %usedLetter%:
call ${model.getFileName()}
popd
subst /d %usedLetter%:
\ No newline at end of file
subst /d %usedLetter%:
#!/usr/bin/env bash
# (c) https://github.com/MontiCore/monticore
baseDir=$(readlink -f `dirname $0`/../../..)
docker run -t -v $baseDir:/project registry.git.rwth-aachen.de/monticore/embeddedmontiarc/generators/emam2middleware/ema-ros-kinetic /bin/bash -c "cd project; src/test/bash/integrationTestRos.sh"
chown -R `who am i | awk '{print $1}'` "$baseDir/target/generated-sources-cmake/"
\ No newline at end of file
chown -R `who am i | awk '{print $1}'` "$baseDir/target/generated-sources-cmake/"
#!/usr/bin/env bash
# (c) https://github.com/MontiCore/monticore
baseDir=$(readlink -f `dirname $0`/../../..)
docker run -t -v $baseDir:/project registry.git.rwth-aachen.de/monticore/embeddedmontiarc/generators/emam2middleware/ema-ros-crystal /bin/bash -c "cd project; src/test/bash/integrationTestRos2.sh"
chown -R `who am i | awk '{print $1}'` "$baseDir/target/generated-sources-ros2/"
\ No newline at end of file
chown -R `who am i | awk '{print $1}'` "$baseDir/target/generated-sources-ros2/"
#!/bin/bash
# (c) https://github.com/MontiCore/monticore
set -e
baseDir=$(readlink -f `dirname $0`/../../..)
......
#!/bin/bash
# (c) https://github.com/MontiCore/monticore
set -e
baseDir=$(readlink -f `dirname $0`/../../..)
for f in `find $baseDir/target/generated-sources-ros2/ -name compile.sh`
do
bash -H $f
done
\ No newline at end of file
done
#!/usr/bin/env bash
# (c) https://github.com/MontiCore/monticore
curDir=$(readlink -f `dirname $0`)
docker build -t registry.git.rwth-aachen.de/monticore/embeddedmontiarc/generators/emam2middleware/ema-ros-crystal $curDir
#!/usr/bin/env bash
# (c) https://github.com/MontiCore/monticore
docker push registry.git.rwth-aachen.de/monticore/embeddedmontiarc/generators/emam2middleware/ema-ros-crystal
curDir=$(readlink -f `dirname $0`)
# (c) https://github.com/MontiCore/monticore
docker build -t registry.git.rwth-aachen.de/monticore/embeddedmontiarc/generators/emam2middleware/ema-ros-kinetic $curDir
docker push registry.git.rwth-aachen.de/monticore/embeddedmontiarc/generators/emam2middleware/ema-ros-kinetic
# (c) https://github.com/MontiCore/monticore
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.middleware;
/*
* Copyright (c) 2015 RWTH Aachen. All rights reserved.
*
* http://www.se-rwth.de/
*/
import de.monticore.lang.monticar.generator.order.simulator.AbstractSymtab;
import org.junit.Assert;
......
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.middleware;
import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.instanceStructure.EMAComponentInstanceSymbol;
......
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.middleware;
import de.monticore.lang.embeddedmontiarc.LogConfig;
......
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.middleware;
import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.instanceStructure.EMAComponentInstanceSymbol;
......
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.middleware;
import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.instanceStructure.EMAComponentInstanceSymbol;
......
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.middleware;
import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.cncModel.EMAComponentSymbol;
......
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.middleware;
import de.monticore.lang.monticar.generator.middleware.cli.DistributedTargetGeneratorCli;
......
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.middleware;
import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.instanceStructure.EMAComponentInstanceSymbol;
......
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.middleware;
import de.monticore.lang.monticar.clustering.cli.algorithms.*;
......
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.middleware;
import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.instanceStructure.EMAComponentInstanceSymbol;
......
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.middleware.templates.compile;
import de.monticore.lang.monticar.generator.FileContent;
......@@ -61,4 +62,4 @@ public class CompilationGeneratorTest extends AbstractSymtabTest {
testFilesAreEqual(Arrays.asList(f1, f2), "compileScripts/Ros2/");
}
}
\ No newline at end of file
}
#!/usr/bin/env bash
# (c) https://github.com/MontiCore/monticore
# via config file
java -jar target/embedded-montiarc-math-middleware-generator-0.0.13-SNAPSHOT-jar-with-dependencies.jar src/test/resources/config/valid.json
# via raw json string
java -jar target/embedded-montiarc-math-middleware-generator-0.0.13-SNAPSHOT-jar-with-dependencies.jar -r "{'modelsDir': 'src/test/resources/','outputDir': 'target/cliTest/validConfigFile','rootModel':'tests.a.addComp','generators': ['cpp','roscpp']}"
\ No newline at end of file
java -jar target/embedded-montiarc-math-middleware-generator-0.0.13-SNAPSHOT-jar-with-dependencies.jar -r "{'modelsDir': 'src/test/resources/','outputDir': 'target/cliTest/validConfigFile','rootModel':'tests.a.addComp','generators': ['cpp','roscpp']}"
#!/usr/bin/env bash
# (c) https://github.com/MontiCore/monticore
#run from project root!
#make sure all ros packages have been sourced!
function quitOnError {
......@@ -47,4 +48,4 @@ then
else
echo "Success!"
exit 0
fi
\ No newline at end of file
fi
#!/usr/bin/env bash
# (c) https://github.com/MontiCore/monticore
#starts all 4 components
targetFolder=target/generated-sources-cmake/system/build
......@@ -7,4 +8,4 @@ sleepTime=100
(${targetFolder}/ba_system_collisionDetection/coordinator/Coordinator_ba_system_collisionDetection -t $sleepTime) & \
(${targetFolder}/ba_system_intersectionController/coordinator/Coordinator_ba_system_intersectionController -t $sleepTime) & \
(${targetFolder}/ba_system_velocityController_1_/coordinator/Coordinator_ba_system_velocityController_1_ -t $sleepTime) & \
(${targetFolder}/ba_system_velocityController_2_/coordinator/Coordinator_ba_system_velocityController_2_ -t $sleepTime)
\ No newline at end of file
(${targetFolder}/ba_system_velocityController_2_/coordinator/Coordinator_ba_system_velocityController_2_ -t $sleepTime)
#run from project root!
# (c) https://github.com/MontiCore/monticore
#make sure all ros packages have been sourced!
function quitOnError {
if [ "$?" -ne 0 ]
......@@ -25,4 +26,4 @@ for d in */ ; do
done
echo Success!
exit 0
\ No newline at end of file
exit 0
/* (c) https://github.com/MontiCore/monticore */
package de.rwth.armin.modeling.autopilot;
import de.rwth.armin.modeling.autopilot.common.*;
......
/* (c) https://github.com/MontiCore/monticore */
package de.rwth.armin.modeling.autopilot;
......@@ -128,4 +129,4 @@ view Autopilot {
connect motion -> Steering;
}
}
\ No newline at end of file
}
/* (c) https://github.com/MontiCore/monticore */
package de.rwth.armin.modeling.autopilot;
component Tests {
......
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