Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/martendo/gpss-server
A web service to run GPSS programs, using gpss.py
https://github.com/martendo/gpss-server
Last synced: about 7 hours ago
JSON representation
A web service to run GPSS programs, using gpss.py
- Host: GitHub
- URL: https://github.com/martendo/gpss-server
- Owner: martendo
- License: mit
- Created: 2021-06-27T20:03:31.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2023-12-27T17:02:01.000Z (11 months ago)
- Last Synced: 2023-12-28T17:48:19.147Z (11 months ago)
- Language: Python
- Homepage: https://martendo.github.io/gpss.py/web
- Size: 24.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gpss-server
A web service to run GPSS programs, using [gpss.py][gpss.py]Server hosted at https://gpss-server.herokuapp.com
## Running a Simulation
To run a gpss.py program with gpss-server, send a `POST` request with
the program in the request body.[Web gpss.py][web-gpss.py] uses something along the lines of this:
```javascript
const request = new XMLHttpRequest();
request.open("POST", "https://gpss-server.herokuapp.com");
request.send(program);
```## Response
gpss-server will respond in [JSON][json]. Based on the status, the
object that is sent back will look a little different.### Success
The simulation has completed successfully.The response object will look like this:
```javascript
{
status: "success",
report: string,
messages: [{
linenum: integer,
text: string,
type: ("parser-error" | "simulation-error" | "warning"),
}, ... ],
}
```For some examples of what the simulation report might look like, see
[the gpss.py examples page][gpss.py-examples].### Parser Error
One or more errors occurred while parsing the program.The response object will look like this:
```javascript
{
status: "parser-error",
message: "Parsing failed with X error(s)",
messages: [{
linenum: integer,
text: string,
type: ("parser-error" | "simulation-error" | "warning"),
}, ... ],
}
```### Simulation Error
An error occurred during simulation.The response object will look like this:
```javascript
{
status: "simulation-error",
message: "Simulation Error",
messages: [{
linenum: integer,
text: string,
type: ("parser-error" | "simulation-error" | "warning"),
}, ... ],
}
```[gpss.py]: https://github.com/martendo/gpss.py
[gpss.py-examples]: https://martendo.github.io/gpss.py/examples
[web-gpss.py]: https://martendo.github.io/gpss.py/web
[json]: https://json.org