summaryrefslogtreecommitdiffstats
path: root/test/AFB.html
blob: b0832d9aba3879013198fca1927e706cba2b979f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<html>
<head>
    <title>Test of AFB Echo</title>
    <script type="text/javascript" src="AFB.js"></script>
    <script type="text/javascript">
	var afb = new AFB("api", "hello");
	var ws;

	function onopen() {
		document.getElementById("main").style.visibility = "visible";
		document.getElementById("connected").innerHTML = "Connected to WebSocket server";
		ws.onevent("*", gotevent);
	}
	function onabort() {
		document.getElementById("main").style.visibility = "hidden";
		document.getElementById("connected").innerHTML = "Connected Closed";
	}
	function init() {
		ws = new afb.ws(onopen, onabort);
	}
	function replyok(obj) {
		document.getElementById("output").innerHTML = "OK: "+JSON.stringify(obj);
	}
	function replyerr(obj) {
		document.getElementById("output").innerHTML = "ERROR: "+JSON.stringify(obj);
	}
	function gotevent(obj) {
		document.getElementById("outevt").innerHTML = JSON.stringify(obj);
	}
	function send(message) {
		var api = document.getElementById("api").value;
		var verb = document.getElementById("verb").value;
		ws.call(api+"/"+verb, {data:message}).then(replyok, replyerr);
	}
    </script>

<body onload="init();">
    <h1>WebSocket Echo</h1>
    <div id="connected">Not Connected</div>
    <div id="main" style="visibility:hidden">
    API: <input type="text" id="api" value="hello" size="80"/><br/>
    VERB: <input type="text" id="verb" value="ping" size="80"/><br/>
    Enter Message: <input type="text" name="message" value="" size="80" onchange="send(this.value)"/><br/>
    Server says... <div id="output"></div>
    Events: <div id="outevt"></div>
    </div>
uot;github" revision="9e62214c8ff2180e076d953753b979d5d41e4cd6" upstream="dunfell"/> <!-- clang support --> <project name="kraj/meta-clang" path="external/meta-clang" remote="github" revision="e63d6f9abba5348e2183089d6ef5ea384d7ae8d8" upstream="dunfell"/> <!-- meta-python2 as stop-gap to allow chromium to build until upstream fixes the dependencies --> <project name="meta-python2" path="external/meta-python2" remote="openembedded" revision="e2ef0dd8fa13d6b96e44773b09d07e4817d0a44d" upstream="dunfell" /> <!-- BSPs --> <!-- Renesas Gen3 specific things --> <project name="renesas-rcar/meta-renesas" path="bsp/meta-renesas" remote="github" revision="ebacfd2c83c37700c30850a4b82742954e630641" upstream="dunfell-dev"/> <project name="CogentEmbedded/meta-rcar" path="bsp/meta-rcar" remote="github" revision="f3ecbd1a33e992475d78a58e8ae785a27cfe7c9e" upstream="dunfell-Yocto-v4.1.0"/> <project name="AGL/meta-agl-refhw" path="bsp/meta-agl-refhw" /> <!-- consolidate on meta-freescale from git.yoctoproject.org --> <project name="meta-freescale" path="bsp/meta-freescale" remote="yocto" revision="46f54fdc5ad854a22bf759aac7fd65db1d1bb574" upstream="dunfell"/> <project name="Freescale/meta-freescale-3rdparty" path="bsp/meta-freescale-3rdparty" remote="github" revision="05b1746a4adc240b690fe965ac5b8a043d9b9d03" upstream="dunfell"/> <!-- TI Vayu / Jacinto 6 / DRA7 --> <project name="meta-arm" path="bsp/meta-arm" remote="yocto" revision="c4f04f3fb66f8f4365b08b553af8206372e90a63" upstream="dunfell"/> <project name="meta-ti" path="bsp/meta-ti" remote="yocto" revision="07209f738f14c98e84874573c98a948ba894ecf3" upstream="dunfell"/> <!-- Raspberry Pi 3, 3B+, and 4 --> <project name="meta-raspberrypi" path="bsp/meta-raspberrypi" remote="yocto" revision="987993209716302eb8f314f69a2a3340555f94d8" upstream="dunfell"/> <!-- DragonBoard 410c specific things --> <project name="meta-qcom" path="bsp/meta-qcom" remote="yocto" revision="2778e164cd0427277e37fc03c8ed19179da1613b" upstream="dunfell"/> <!-- Altera SOCFPGA platform --> <!-- https://github.com/kraj/meta-altera --> <project name="kraj/meta-altera" path="bsp/meta-altera" remote="github" revision="1db773d79403c4439103f3fba51b6c42d5f7b266" upstream="master"/> <!-- Sancloud BSP layers --> <project name="SanCloudLtd/meta-sancloud" path="bsp/meta-sancloud" remote="github" revision="3abbcd8318674c6d82bd93132e9134e946620624" upstream="dunfell"/> <project name="EmbeddedAndroid/meta-rtlwifi" path="bsp/meta-rtlwifi" remote="github" revision="7b556aa2265cfc41e6e5fda7085619436fe9a385" upstream="dunfell"/> <!-- meta-synopsys - support for ARC HSDK board --> <project name="foss-for-synopsys-dwc-arc-processors/meta-synopsys" path="bsp/meta-synopsys" remote="github" revision="80656bf6551b2056c8cb02a74510e595e2553048" upstream="dunfell-agl"/> </manifest>