+ send_text(s, "<html><head><title>%s</title></head><body bgcolor=\"#ffffff\" text=\"#000000\">\n", scope_idn(sc));
+ send_text(s, "<img src=\"/cgi-bin/lcd\" height=\"234\" width=\"320\">\n");
+ send_text(s, "<br>\n");
+
+ claimscope(sc);
+ update_scope_status(sc);
+
+ send_text(s, "System: Language: %s, Counter: %d, Beep: %d<br>\n",
+ sc->status.system.lang,
+ sc->status.system.counter_enabled,
+ sc->status.system.beep_enabled);
+
+ send_text(s, "Keyboard: Key Lock: %d<br>\n",
+ sc->status.keyboard.key_lock);
+
+ send_text(s, "Acquire: Type: %s, Mode: %s, Averages: %d<br>\n",
+ sc->status.acquire.type,
+ sc->status.acquire.mode,
+ sc->status.acquire.averages);
+
+ send_text(s, "Horizontal: Mode: %s, Offset: %lg, Delayed Offset: %lg, Scale: %lg, Format: %s<br>\n",
+ sc->status.timebase.mode,
+ sc->status.timebase.offset,
+ sc->status.timebase.delayed_offset,
+ sc->status.timebase.scale,
+ sc->status.timebase.format);
+
+ send_text(s, "Display: ");
+ send_command_output(s, sc, ":DISP:TYPE?");
+ send_text(s, ", ");
+ send_command_output(s, sc, ":DISP:SCR?");
+ send_text(s, ", Grid: ");
+ send_command_output(s, sc, ":DISP:GRID?");
+ send_text(s, ", Persistence: ");
+ send_command_output(s, sc, ":DISP:PERS?");
+ send_text(s, ", Menu: ");
+ send_command_output(s, sc, ":DISP:MNUS?");
+ send_text(s, ", Brightness: ");
+ send_command_output(s, sc, ":DISP:BRIG?");
+ send_text(s, ", Intensity: ");
+ send_command_output(s, sc, ":DISP:INT?");
+ send_text(s, "<br>\n");
+
+ send_text(s, "Channel 1: ");
+ send_command_output(s, sc, ":CHAN1:DISP?");
+ send_text(s, ", ");
+ send_command_output(s, sc, ":CHAN1:MEMD?");
+ send_text(s, " sample depth, %.10lg samples/s<br>\n", sc->status.acquire.srate_chan1);
+ send_text(s, "Channel 2: ");
+ send_command_output(s, sc, ":CHAN2:DISP?");
+ send_text(s, ", ");
+ send_command_output(s, sc, ":CHAN2:MEMD?");
+ send_text(s, " sample depth, %.10lg samples/s<br>\n", sc->status.acquire.srate_chan2);
+
+ releasescope(sc);
+
+ send_text(s, sc->status.system.lang);
+
+ send_text(s, "<br>\n");
+ send_text(s, "<form method=\"get\" action=\"\">\n");
+ send_text(s, "<input type=\"text\" name=\"cmd\" value=\"");
+ if (param) {
+ if (strncmp(param, "cmd=", 4) == 0)
+ param += 4;
+
+ send_text(s, param);
+ }
+ send_text(s, "\">\n");
+ send_text(s, "<input type=\"submit\">\n");
+ send_text(s, "</form>\n");
+ send_text(s, "<a href=\"?cmd=:RUN\">RUN</a> ");
+ send_text(s, "<a href=\"?cmd=:STOP\">STOP</a> ");
+ send_text(s, "<a href=\"?cmd=:FORC\">FORCE</a> ");
+ if (param) {
+ claimscope(sc);
+ if (strchr (param, '?')) {
+ send_text(s, "<pre>< ");
+ send_text(s, param);
+ send_text(s, "\n> ");
+ send_command_output(s, sc, param);
+ send_text(s, "</pre>\n");
+ } else {
+ sendscpi(sc, param, NULL, 0);
+ }
+ releasescope(sc);
+ }