Commit 0a9235ef authored by Bernhard Rumpe's avatar Bernhard Rumpe

BR-sy

parent 9e266e92
Pipeline #175556 failed with stage
in 13 seconds
# (c) https://github.com/MontiCore/monticore
image: maven:3-jdk-8
......
# (c) https://github.com/MontiCore/monticore
script:
- git checkout ${TRAVIS_BRANCH}
- mvn -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -B clean install cobertura:cobertura org.eluder.coveralls:coveralls-maven-plugin:report --settings "settings.xml"
......
<!-- (c) https://github.com/MontiCore/monticore -->
# Server
![pipeline](https://git.rwth-aachen.de/monticore/EmbeddedMontiArc/simulators/server/badges/master/build.svg)
![coverage](https://git.rwth-aachen.de/monticore/EmbeddedMontiArc/simulators/server/badges/master/coverage.svg)
......@@ -384,4 +385,4 @@ Although this smartfox image is currently set to use SQLite as default database,
Additionally, if you just need the postgres database and find it complicated to setup, you can use the following command to start a postgres database:
```
$ docker-compose up postgres -d
```
\ No newline at end of file
```
<?xml version="1.0" encoding="UTF-8"?>
<!-- (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/maven-v4_0_0.xsd">
<parent>
<artifactId>montisim</artifactId>
......
<!-- (c) https://github.com/MontiCore/monticore -->
<zone>
<name>World</name>
<isCustomLogin>false</isCustomLogin>
......@@ -159,4 +160,4 @@
<blockTime>3000</blockTime>
</databaseManager>
<allowUploads>true</allowUploads>
</zone>
\ No newline at end of file
</zone>
# (c) https://github.com/MontiCore/monticore
version: "3"
services:
......
sqlite3 world.db ".read sqlite-world.sql"
\ No newline at end of file
@rem (c) https://github.com/MontiCore/monticore
sqlite3 world.db ".read sqlite-world.sql"
#!/bin/bash
# (c) https://github.com/MontiCore/monticore
sqlite3 world_linux.db ".read sqlite-world.sql"
\ No newline at end of file
sqlite3 world_linux.db ".read sqlite-world.sql"
@rem (c) https://github.com/MontiCore/monticore
REM Batch script
SET CONFIG_DIR=main\resources
......
#!/bin/bash
# (c) https://github.com/MontiCore/monticore
CONFIG_DIR="main/resources"
CONFIG_FILE="config.properties"
......@@ -17,4 +18,4 @@ cp -nf $SQLITE_DB $SFS_EXT_DIR/world.db
#Change permissions for all extensions
chmod -R +x $SFS_EXT_DIR
echo Extensions deployed \(Platform Unix\)
\ No newline at end of file
echo Extensions deployed \(Platform Unix\)
#!/usr/bin/env bash
# (c) https://github.com/MontiCore/monticore
# This script re-compile all *.fmu files in the current directory using
# current available c++ compiler. This makes the fmu files compatible with
......
/* (c) https://github.com/MontiCore/monticore */
sim Aachen {
sim_duration 4h;
......
/* (c) https://github.com/MontiCore/monticore */
sim Aachen {
sim_duration 4h;
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
******************************************************************************
MontiCAR Modeling Family, www.se-rwth.de
Copyright (c) 2017, Software Engineering Group at RWTH Aachen,
All rights reserved.
This project is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 3.0 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this project. If not, see <http://www.gnu.org/licenses/>.
*******************************************************************************
-->
<!-- (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">
......
<!-- (c) https://github.com/MontiCore/monticore -->
This is the simulation server module. It provides a set of RESTful APIs for setting up, running simulation and also
......
......@@ -6,4 +6,4 @@ COPY . .
RUN apt-get update && \
apt-get install -y openjfx && \
cd /app/rpc && \
mvn install -DskipTests -s ../settings.xml
\ No newline at end of file
mvn install -DskipTests -s ../settings.xml
#!/usr/bin/env bash
# (c) https://github.com/MontiCore/monticore
cp ./target/classes/app.db app.db
cp ./target/restful-2.0.0.jar app.jar
......
# (c) https://github.com/MontiCore/monticore
version: "3"
services:
......
# (c) https://github.com/MontiCore/monticore
swagger: "2.0"
info:
description: "API doc for MontiSim server"
......@@ -471,4 +472,4 @@ definitions:
$ref: "#/definitions/DataFrame"
externalDocs:
description: "MontiSim server"
url: "https://git.rwth-aachen.de/monticore/EmbeddedMontiArc/simulators/server"
\ No newline at end of file
url: "https://git.rwth-aachen.de/monticore/EmbeddedMontiArc/simulators/server"
<?xml version="1.0" encoding="UTF-8"?>
<!-- (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">
......@@ -237,4 +238,4 @@
<url>https://nexus.se.rwth-aachen.de/content/repositories/embeddedmontiarc-snapshots/</url>
</snapshotRepository>
</distributionManagement>
</project>
\ No newline at end of file
</project>
#!/usr/bin/env bash
# (c) https://github.com/MontiCore/monticore
# this script serves the purpose of running unitetests in gitlab-runner.
# It starts all dependent services needed before starting the tests.
......
/* (c) https://github.com/MontiCore/monticore */
package server.restful;
import org.springframework.boot.SpringApplication;
......
/* (c) https://github.com/MontiCore/monticore */
package server.restful;
import com.google.common.base.Predicates;
......
/* (c) https://github.com/MontiCore/monticore */
package server.restful.dao;
import org.slf4j.Logger;
......
/* (c) https://github.com/MontiCore/monticore */
package server.restful.dao;
import server.restful.model.MapModel;
......
/* (c) https://github.com/MontiCore/monticore */
package server.restful.dao;
import server.restful.model.ScenarioModel;
......
/* (c) https://github.com/MontiCore/monticore */
package server.restful.dao;
import com.fasterxml.jackson.databind.ObjectMapper;
......
/* (c) https://github.com/MontiCore/monticore */
package server.restful.graph;
import commons.controller.commons.Vertex;
......
/* (c) https://github.com/MontiCore/monticore */
package server.restful.graph;
import commons.controller.commons.Vertex;
......
/* (c) https://github.com/MontiCore/monticore */
package server.restful.graph.structures;
import structures.Edge;
......
/* (c) https://github.com/MontiCore/monticore */
package server.restful.model;
import com.fasterxml.jackson.annotation.JsonInclude;
......
/* (c) https://github.com/MontiCore/monticore */
package server.restful.model;
......
/* (c) https://github.com/MontiCore/monticore */
package server.restful.model;
import commons.controller.commons.Vertex;
......
/* (c) https://github.com/MontiCore/monticore */
package server.restful.model;
import com.fasterxml.jackson.annotation.JsonInclude;
......
/* (c) https://github.com/MontiCore/monticore */
package server.restful.model;
......
/* (c) https://github.com/MontiCore/monticore */
package server.restful.model;
import com.fasterxml.jackson.annotation.JsonInclude;
......
/* (c) https://github.com/MontiCore/monticore */
package server.restful.registry;
/**
......
/* (c) https://github.com/MontiCore/monticore */
package server.restful.registry;
import org.I0Itec.zkclient.exception.ZkTimeoutException;
......
/* (c) https://github.com/MontiCore/monticore */
package server.restful.registry;
public class RemoteAutopilotService extends RemoteService{
......
/* (c) https://github.com/MontiCore/monticore */
package server.restful.registry;
import org.I0Itec.zkclient.ZkClient;
......
/* (c) https://github.com/MontiCore/monticore */
package server.restful.registry;
import java.util.List;
......
/* (c) https://github.com/MontiCore/monticore */
package server.restful.registry;
public interface ServiceRegistry {
......
/* (c) https://github.com/MontiCore/monticore */
package server.restful.registry;
import org.I0Itec.zkclient.ZkClient;
......
/* (c) https://github.com/MontiCore/monticore */
package server.restful.registry.util;
import org.I0Itec.zkclient.IZkDataListener;
......
/* (c) https://github.com/MontiCore/monticore */
package server.restful.registry.util;
import org.I0Itec.zkclient.ZkClient;
......
/* (c) https://github.com/MontiCore/monticore */
package server.restful.service;
import commons.controller.commons.Vertex;
......
/* (c) https://github.com/MontiCore/monticore */
package server.restful.service;
import commons.controller.commons.Vertex;
......
/* (c) https://github.com/MontiCore/monticore */
package server.restful.service;
import server.restful.dao.ScenarioDAO;
......
/* (c) https://github.com/MontiCore/monticore */
package server.restful.service;
import de.monticore.lang.montisim.simlang.SimLangTool;
......
/* (c) https://github.com/MontiCore/monticore */
package server.restful.service;
import com.google.protobuf.ByteString;
......
/* (c) https://github.com/MontiCore/monticore */
package server.restful.service;
import commons.controller.commons.Vertex;
......
/* (c) https://github.com/MontiCore/monticore */
package server.restful.service;
import org.slf4j.Logger;
......
/* (c) https://github.com/MontiCore/monticore */
package server.restful.util;
import org.slf4j.Logger;
......
/* (c) https://github.com/MontiCore/monticore */
package server.restful.view;
import org.springframework.http.HttpStatus;
......
/* (c) https://github.com/MontiCore/monticore */
package server.restful.view;
import org.springframework.web.bind.annotation.*;
......
/* (c) https://github.com/MontiCore/monticore */
package server.restful.view;
import org.springframework.http.HttpStatus;
......
......@@ -4,4 +4,4 @@ spring.resources.chain.cache=true
# file upload size limit
spring.servlet.multipart.max-file-size=10MB
spring.servlet.multipart.max-request-size=10MB
server.port=8090
\ No newline at end of file
server.port=8090
......@@ -14,4 +14,4 @@ simulation_step_ms=500
windows_dev_mode=false
# define the maximum simulation duration
max_simulation_time_ms=10000
\ No newline at end of file
max_simulation_time_ms=10000
# (c) https://github.com/MontiCore/monticore
from peewee import *
db = SqliteDatabase("app.db")
......
/* (c) https://github.com/MontiCore/monticore */
package server.restful.api;
import org.junit.Test;
......
/* (c) https://github.com/MontiCore/monticore */
package server.restful.dao;
import org.junit.Before;
......@@ -43,4 +44,4 @@ public class MapDAOTest {
MapDAO.create("map2.osm", "/new/path/to/map.osm");
assertEquals(3, MapDAO.getAll().size());
}
}
\ No newline at end of file
}
/* (c) https://github.com/MontiCore/monticore */
package server.restful.dao;
import org.junit.Before;
......@@ -34,4 +35,4 @@ public class ScenarioDAOTest {
ScenarioDAO.create("sample2.sim", "/path/to/sample.sim");
assertEquals(3, ScenarioDAO.getAll().size());
}
}
\ No newline at end of file
}
/* (c) https://github.com/MontiCore/monticore */
package server.restful.dao;
import org.junit.Before;
......@@ -85,4 +86,4 @@ public class SimulationDAOTest {
assertEquals(frame.getTotalTime(), deserializedResult.getFrames().get(0).getTotalTime(), 1e-5);
}
}
\ No newline at end of file
}
/* (c) https://github.com/MontiCore/monticore */
package server.restful.graph;
import org.junit.Before;
......@@ -64,4 +65,4 @@ public class MetisGraphTest {
new MetisGraph(graph.getMapPathBySectorIdx(i), -1).init();
}
}
}
\ No newline at end of file
}
/* (c) https://github.com/MontiCore/monticore */
package server.restful.graph;
import commons.controller.commons.Vertex;
......@@ -64,4 +65,4 @@ public class OverlayUtilTest {
// graph.sectorize();
OverlayUtil.createOverlayMap(graph.getOriginalGraph(), graph.getOsmIdSectorMapping(), basePath + "/Aachen_6_test.overlay.dot");
}
}
\ No newline at end of file
}
/* (c) https://github.com/MontiCore/monticore */
package server.restful.registry;
import org.junit.Test;
......@@ -17,4 +18,4 @@ public class DefaultRegistryTest {
assertEquals("localhost", new DefaultRegistry().getSimulator().getHost());
assertEquals(6000, new DefaultRegistry().getSimulator().getPort());
}
}
\ No newline at end of file
}
/* (c) https://github.com/MontiCore/monticore */
package server.restful.registry;
import org.junit.Test;
......@@ -20,4 +21,4 @@ public class RegistryFactoryTest {
public void getZookeeperRegistry() {
assertTrue(RegistryFactory.getZookeeperRegistry() instanceof ZookeeperRegistry);
}
}
\ No newline at end of file
}
/* (c) https://github.com/MontiCore/monticore */
package server.restful.registry;
import org.I0Itec.zkclient.ZkClient;
......@@ -61,4 +62,4 @@ public class RemoteAutopilotServiceTest {
@Test
public void release() {
}
}
\ No newline at end of file
}
/* (c) https://github.com/MontiCore/monticore */
package server.restful.registry;
import org.I0Itec.zkclient.ZkClient;
......@@ -57,4 +58,4 @@ public class RemoteSimulatorServiceTest {
assertEquals(0, zkClient.getChildren(RemoteSimulatorService.OCCUPATION_PATH).size());
assertTrue(svc.isAvailable());
}
}
\ No newline at end of file
}
/* (c) https://github.com/MontiCore/monticore */
package server.restful.registry;
import org.I0Itec.zkclient.ZkClient;
......@@ -87,4 +88,4 @@ public class ZookeeperRegistryTest {
assertFalse(zkClient.exists( "/simulators/occupied/simulator-201:6000"));
assertEquals(0, zkClient.getChildren("/autopilots/busy/autopilot-50:10101").size());
}
}
\ No newline at end of file
}
/* (c) https://github.com/MontiCore/monticore */
package server.restful.registry.util;
import org.I0Itec.zkclient.ZkClient;
......@@ -108,4 +109,4 @@ public class LockTest {
assertEquals(0, zk.getChildren("/resource/locks").size());
assertFalse(lock.acquired());
}
}
\ No newline at end of file
}
/* (c) https://github.com/MontiCore/monticore */
package server.restful.service;
import commons.controller.commons.Vertex;
......@@ -76,4 +77,4 @@ public class MapServiceTest {
assertEquals(0, mapService.getSectorIdxByOsmID(5170132217L));
assertEquals(1, mapService.getSectorIdxByOsmID(5170132468L));
}
}
\ No newline at end of file
}
/* (c) https://github.com/MontiCore/monticore */
package server.restful.service;
import commons.controller.commons.Vertex;
......@@ -18,4 +19,4 @@ public class NavigationServiceTest {
int length = NavigationService.getShortestOverlayPath(g, (Vertex) vertices[0], (Vertex) vertices[2]).getLength();
Assert.assertTrue(length > 0);
}
}
\ No newline at end of file
}
/* (c) https://github.com/MontiCore/monticore */
package server.restful.service;
import junit.framework.TestCase;
......@@ -37,4 +38,4 @@ public class SimulationServiceTest extends TestCase {
Properties prop = Util.getProperties();
assertTrue(prop.size() > 0);
}
}
\ No newline at end of file
}
/* (c) https://github.com/MontiCore/monticore */
package server.restful.service;
import commons.controller.commons.Vertex;
......@@ -73,4 +74,4 @@ public class VehicleServiceTest {
}
System.out.println("hi");
}
}
\ No newline at end of file
}
/* (c) https://github.com/MontiCore/monticore */
package server.restful.service;
import org.junit.Test;
......@@ -21,4 +22,4 @@ public class WorldBuilderServiceTest {
assertTrue(result.getHeightMap().getHeightMapMaxX() != 0);
assertTrue(result.getHeightMap().getHeightMapMaxY() != 0);
}
}
\ No newline at end of file
}
/* (c) https://github.com/MontiCore/monticore */
package server.restful.view;
import org.junit.Before;
......
/* (c) https://github.com/MontiCore/monticore */
package server.restful.view;
import org.junit.Assert;
......@@ -32,4 +33,4 @@ public class MapViewTest extends AbstractViewTest{