A web service to run GPSS programs, using gpss.py
Server hosted at https://gpss-server.herokuapp.com
To run a gpss.py program with gpss-server, send a POST
request with
the program in the request body.
Web gpss.py uses something along the lines of this:
const request = new XMLHttpRequest();
request.open("POST", "https://gpss-server.herokuapp.com");
request.send(program);
gpss-server will respond in JSON. Based on the status, the object that is sent back will look a little different.
The simulation has completed successfully.
The response object will look like this:
{
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.
One or more errors occurred while parsing the program.
The response object will look like this:
{
status: "parser-error",
message: "Parsing failed with X error(s)",
messages: [{
linenum: integer,
text: string,
type: ("parser-error" | "simulation-error" | "warning"),
}, ... ],
}
An error occurred during simulation.
The response object will look like this:
{
status: "simulation-error",
message: "Simulation Error",
messages: [{
linenum: integer,
text: string,
type: ("parser-error" | "simulation-error" | "warning"),
}, ... ],
}