%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ***** ServerSentEvents ***** The only constantly open connection: /updates response: the id-message is got immediately, later a mix of all other types of messages may be received ********************************************************************************************************************************* = { "type": "id", "id":, "title": } <update-message> = { "type": "update", "updates": [{"name": <name0>, "value": <value0>}, ...] } <redraw-message> = { "type": "redraw", "path": <path> } <console-update-message> = { "type": "command" | "reply", "origin": "self" | "other", "lines": <line> } <graph-update-message> = { "type": "graph-update", "time": <server-time>, "graph": { "<name1>": [[<time>,<value>],[<time>,<value>]... "<name2>": [[<time>,<value>],[<time>,<value>]... ... } } <graph-redraw-message> = { "type": "graph-redraw" } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ***** XMLHttp ***** All other connections are to be closed (getJSON): ********************************************************************************************************************************* /getblock?path=<path>&id=<id> response: <draw-message> <draw-message> = { "type": "draw", "path": <path>, "components": [<component0>, <component1>, ...] } ********************************************************************************************************************************* <component> = <input> | <rdonly> | <checkbox> | <radio-group> <input> = { "type": "input", "name": <variable name>, "title": <title> <optional-attributes> } <rdonly> = { "type": "rdonly", "name": <variable name>, "title": <title> <optional-attributes> } <checkbox> = { "type": "checkbox", "name": <variable name>, "title": <title> <optional-attributes> } <radio-group> = { "type": "radio", "name": <variable name>, "title": <title>, "buttons": [{"value": <value0>, "title": <title0>} , ...], <optional-attributes> } <optional-attributes> = ["info": <tool-tip-text> ,] ********************************************************************************************************************************* /updateblock?path=<path>&id=<id> response: <accept-block-message> (and from now on, update-messages (incl. initial updates) are sent) <accept-block-message> = { "type": "accept-block", } ********************************************************************************************************************************* /sendcommand?command=<command>&id=<id> response: <accept-command-message> <accept-command-message> = { "type": "accept-command", } ********************************************************************************************************************************* /gettime?time=<start>,<end>&id=<id> response: <time-message> <time-message> = { "type":"time", "time": [<start>, <end>] } ********************************************************************************************************************************* /getvars?time=<time>&id=<id> response: <varlist-message> <varlist-message> = { "type":"var_list", "blocks": [ { "tag":"K_2", "unit": "K", "curves": [ { "name":<name1>, "label":<label1>, "color":<color1> }, { "name":<name2>, ... } ... ] }, { "tag":"mbar", "unit": "mbar", "curves": ... }, ... ] } ********************************************************************************************************************************* /updategraph?id=<id>[&variables=<variable list>] if <variables list> is given, the given variables will be updated with the graph-update-message response: <accept-graph-message> <accept-graph-message> = = { "type": "accept-graph", "live": true/false } the "live" flag is true when the last /graph query was including the actual time ********************************************************************************************************************************* /graph?time=<start>,<end>&variables=<variable list>&id=<id> the given variables are added to the list of variables being updated with the graph-update-message response: <graph-draw-message> <graph-draw-message> = = { "type": "graph-draw", "graph": { "<name1>": [[<time>,<value>],[<time>,<value>]... "<name2>": [[<time>,<value>],[<time>,<value>]... ... } ********************************************************************************************************************************* /console?id=<id> response: <accept-console-message> (and from now on, console-updates-messages (incl. history) are sent) <accept-console-message> = { "type": "accept-console", }