Commit 1ac4e665 authored by hengwen's avatar hengwen
Browse files

More docs

parent 4fb058ff
......@@ -101,6 +101,27 @@ It starts a rpc server that listen on port **8788** for debugging.
$ ./run_test.sh
```
## Visualization
By default, visualization is not enabled on the server.
To enable visualization, put the static files under `restful/src/main/resources/resources`.
Aa an example, to use the visualization provided in [visualization repo](https://git.rwth-aachen.de/monticore/EmbeddedMontiArc/simulators/visualization),
copy everything from [webapp directory](https://git.rwth-aachen.de/monticore/EmbeddedMontiArc/simulators/visualization/tree/master/src/main/webapp) into
`restful/src/main/resources/resources`.
Start the restful server, the visualization client will be available at [http://localhost:8080/index.html](http://localhost:8080/index.html)
## Simulation via RESTful API
After the server started, simulation tasks can be configured via the RESTful APIs.
The sequence should be:
1. Upload the map with `POST /map`
2. Upload the scenario file with `POST /scenario`
3. Create simulation with `POST /simulation`
4. Start the simulation with `POST /simulation/{id}/start`
5. Check the simulation status with `GET /simulation/{id}/status`
6. Once finished, retrieve all results with `GET /simulation/{id}/result`
7. Individual sector map data can downloaded with `GET /simulation/{id}/map-data/{sectorIdx}`. The minimal sector index is 0, maximal is *num_sectors* - 1.
## Endpoints
The restful endpoints are defined in the `openapi.yml`.
### Map
......
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