aboutsummaryrefslogtreecommitdiffstats
path: root/htdocs/UNICENS.html
blob: ab478f6a0d50310e1a1b4801dd7551b7eaa2ed75 (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
48
49
50
51
52
53
54
<html>
<head>
    <title>Unicens Simple Test</title>

    <link rel="stylesheet" href="Ucs2Binding.css">
    <script type="text/javascript" src="AFB-websock.js"></script>
    <script type="text/javascript" src="Ucs2Binding.js"></script>

<body onload="init('ucs2_config','unicens', 'listconfig');">
    <h1>Unicens Simple Test</h1>

    <button id="connected" onclick="init('ucs2_config','unicens', 'listconfig')">Binder WS Fail</button>
    <br><br>
    <b>Selected HAL </b>
    <select id='ucs2_config'></select>
    <br>

    <ol>
    <li><button onclick="callbinder('UNICENS','subscribe', {})">Subscribe to network events</button></li>
    <li><button onclick="callbinder('UNICENS','subscriberx', {})">Subscribe to Rx message events</button></li>
    <li><button onclick="callbinder('UNICENS','initialise', {filename:ucs2_config})">Parse XML and Start UNICENS</button></li>
    </ol>
    <br>
    <!--
    <ol>
    <li><button onclick="callbinder('UNICENS','writei2c', [{node: 0x270, data:[0x07,0x01,0x00]}, {node: 0x271, data:[0x07,0x01,0x00]}, {node: 0x272, data:[0x07,0x01,0x00]}] )">WriteI2c Master (100%)</button></li>
    <li><button onclick="callbinder('UNICENS','writei2c', [{node: 0x270, data:[0x07,0x01,0x99]}, {node: 0x271, data:[0x07,0x01,0x99]}, {node: 0x272, data:[0x07,0x01,0x99]}] )">WriteI2c Master (80%)</button></li>
    <li><button onclick="callbinder('UNICENS','writei2c', [{node: 0x270, data:[0x07,0x02,0x32]}, {node: 0x271, data:[0x07,0x02,0x32]}, {node: 0x272, data:[0x07,0x02,0x32]}] )">WriteI2c Master (60%)</button></li>
    <li><button onclick="callbinder('UNICENS','writei2c', [{node: 0x270, data:[0x07,0x02,0xCB]}, {node: 0x271, data:[0x07,0x02,0xCB]}, {node: 0x272, data:[0x07,0x02,0xCB]}] )">WriteI2c Master (40%)</button></li>
    <li><button onclick="callbinder('UNICENS','writei2c', [{node: 0x270, data:[0x07,0x03,0x64]}, {node: 0x271, data:[0x07,0x03,0x64]}, {node: 0x272, data:[0x07,0x03,0x64]}] )">WriteI2c Master (20%)</button></li>
    <li><button onclick="callbinder('UNICENS','writei2c', [{node: 0x270, data:[0x07,0x03,0xFF]}, {node: 0x271, data:[0x07,0x03,0xFF]}, {node: 0x272, data:[0x07,0x03,0xFF]}] )">WriteI2c Master (0%)</button></li>
    </ol>
    -->
    <br>
    <ol>
    <li><button onclick="callbinder('UNICENS','writei2c', {node: 0x270, data:[0x07,0x03,0xFF]})">WriteI2c to 0x270 (mute)</button></li>
    <li><button onclick="callbinder('UNICENS','writei2c', {node: 0x271, data:[0x07,0x03,0xFF]})">WriteI2c to 0x271 (mute)</button></li>
    <li><button onclick="callbinder('UNICENS','writei2c', {node: 0x272, data:[0x07,0x03,0xFF]})">WriteI2c to 0x272 (mute)</button></li>
    </ol>
    <ol>
    <li><button onclick="callbinder('UNICENS','sendmessage', {node: 0x270, msgid: 0x5AC4, data:'ESIzRA=='})">Send ControlMsgB64 to 0x270</button></li>
    <li><button onclick="callbinder('UNICENS','sendmessage', {node: 0x270, msgid: 0x5AC4})">Send ControlMsgB64 to 0x270 (no data)</button></li>
    <!--<li><button onclick="callbinder('UNICENS','sendmessage', {node: 0x270, msgid: 0x5AC4, data: null})">Send ControlMsgB64 to 0x270 (data: null)</button></li>-->
    <!--<li><button onclick="callbinder('UNICENS','sendmessage', {node: 0x270, msgid: 0x5AC4, data: ''})">Send ControlMsgB64 to 0x270 (data: '')</button></li>-->
    </ol>
    <br>
    <br>
    <div id="main" style="visibility:hidden">
    <ol>
    <li>Question <pre id="question"></pre>
    <li>Response <pre id="output"></pre>
    <li>Events: <pre id="outevt"></pre>
    </ol>
    </div>