sop - 24leesten/SimU-Wiki GitHub Wiki
Simulation Output Protocol (SOP)
Note: Outputs are separated by the newline character, so a single output cannot contain newlines.
HTML
Use this control to send back custom HTML to be displayed on output page. External scripts can be used by making use of JQeury's getScript() function.
{
"type" : "html",
"html" : string,
"required_files" : array # This is an array of strings that are relative file paths
# for any file required by the html (i.e., css, javascript,
# img, …).
}
Text
Displays plain text on the output page.
{
"type" : "text",
"text" : string
}
Image
Display an image on the run page
{
"type" : "img",
"image" : string, # This is a relative file path to the image you want to display
}
Heartbeat
Used to send status information back to the run page. This control affects the loading bar at the bottom of the output page.
{
"type" : "heartbeat",
"percent" : int, # Optional, controls the progress bars completion on the run page
"message" : string # Optional, The run page will display message until
}