agl-service-unicens: support microphone front-end
[apps/agl-service-unicens.git] / htdocs / UNICENS.html
1 <html>
2 <head>
3     <title>Unicens Simple Test</title>
4
5     <link rel="stylesheet" href="Ucs2Binding.css">
6     <script type="text/javascript" src="AFB-websock.js"></script>
7     <script type="text/javascript" src="Ucs2Binding.js"></script>
8     <style>
9                 .divTable{
10                         display: table;
11
12                 }
13                 .divTableRow {
14                         display: table-row;
15                 }
16                 .divTableHeading {
17                         background-color: #EEE;
18                         display: table-header-group;
19                 }
20                 .divTableCell, .divTableHead {
21                         border: 1px solid #999999;
22                         display: table-cell;
23                         padding: 3px 10px;
24                 }
25                 .divTableHeading {
26                         background-color: #EEE;
27                         display: table-header-group;
28                         font-weight: bold;
29                 }
30                 .divTableFoot {
31                         background-color: #EEE;
32                         display: table-footer-group;
33                         font-weight: bold;
34                 }
35                 .divTableBody {
36                         display: table-row-group;
37                 }
38
39                 .ucsCtrlButton {
40                         border: none;
41                         padding: 5px 15px;
42                         text-align: center;
43                         text-decoration: none;
44                         display: inline-block;
45                         font-size: 16px;
46                         width: 144px;
47                         border: 2px solid #4CAF50;
48                 }
49         </style>
50 </head>
51 <body onload="init('ucs2_config','unicens', 'listconfig');">
52     <h1>Unicens Simple Test</h1>
53
54     <button id="connected" onclick="init('ucs2_config','unicens', 'listconfig')">Binder WS Fail</button>
55     <br><br>
56     <b>Selected HAL </b>
57     <select id='ucs2_config'></select>
58     <br>
59
60     <ol>
61     <li><button onclick="callbinder('UNICENS','subscribe', {})">Subscribe to network events</button></li>
62     <li><button onclick="callbinder('UNICENS','subscriberx', {})">Subscribe to Rx message events</button></li>
63     <li><button onclick="callbinder('UNICENS','initialise', {filename:ucs2_config})">Parse XML and Start UNICENS</button></li>
64     </ol>
65     <br>
66
67     <h1>K2L Slim-Amp Demo</h1>
68     <ol>
69     <li><button onclick="callbinder('UNICENS','writei2c', {node: 0x270, data:[0x07,0x03,0xFF]})">WriteI2c to 0x270 (mute)</button></li>
70     <li><button onclick="callbinder('UNICENS','writei2c', {node: 0x271, data:[0x07,0x03,0xFF]})">WriteI2c to 0x271 (mute)</button></li>
71     <li><button onclick="callbinder('UNICENS','writei2c', {node: 0x272, data:[0x07,0x03,0xFF]})">WriteI2c to 0x272 (mute)</button></li>
72     </ol>
73     <ol>
74     <li><button onclick="callbinder('UNICENS','sendmessage', {node: 0x270, msgid: 0x5AC4, data:'ESIzRA=='})">Send ControlMsgB64 to 0x270</button></li>
75     <li><button onclick="callbinder('UNICENS','sendmessage', {node: 0x270, msgid: 0x5AC4})">Send ControlMsgB64 to 0x270 (no data)</button></li>
76     <!--<li><button onclick="callbinder('UNICENS','sendmessage', {node: 0x270, msgid: 0x5AC4, data: null})">Send ControlMsgB64 to 0x270 (data: null)</button></li>-->
77     <!--<li><button onclick="callbinder('UNICENS','sendmessage', {node: 0x270, msgid: 0x5AC4, data: ''})">Send ControlMsgB64 to 0x270 (data: '')</button></li>-->
78     </ol>
79     <br>
80
81     <h1>Microphone Front-End</h1>
82     <h2>Mode</h2>
83     <button class="ucsCtrlButton" onclick="callbinder('UNICENS','sendmessage', {node: 0x520, msgid: 0x1000, data:'AQA='})">Off</button><!--01 00 -->
84     <button class="ucsCtrlButton" onclick="callbinder('UNICENS','sendmessage', {node: 0x520, msgid: 0x1000, data:'AQE='})">Idle</button><!--01 01 -->
85     <button class="ucsCtrlButton" onclick="callbinder('UNICENS','sendmessage', {node: 0x520, msgid: 0x1000, data:'AQI='})">Listening</button><!--01 02 -->
86     <button class="ucsCtrlButton" onclick="callbinder('UNICENS','sendmessage', {node: 0x520, msgid: 0x1000, data:'AQM='})">Processing</button><!--01 03 -->
87     <button class="ucsCtrlButton" onclick="callbinder('UNICENS','sendmessage', {node: 0x520, msgid: 0x1000, data:'AQQ='})">Error</button><!--01 04 -->
88     <h2>Direction</h2>
89     <button class="ucsCtrlButton" onclick="callbinder('UNICENS','sendmessage', {node: 0x520, msgid: 0x1001, data:'AQAA'})">0</button><!--01 00 00 -->
90     <button class="ucsCtrlButton" onclick="callbinder('UNICENS','sendmessage', {node: 0x520, msgid: 0x1001, data:'AQBa'})">90</button><!--01 00 5A -->
91     <button class="ucsCtrlButton" onclick="callbinder('UNICENS','sendmessage', {node: 0x520, msgid: 0x1001, data:'AQC0'})">180</button><!--01 00 B4 -->
92     <button class="ucsCtrlButton" onclick="callbinder('UNICENS','sendmessage', {node: 0x520, msgid: 0x1001, data:'AQEO'})">270</button><!--01 01 0E -->
93
94     <h1>Fiberdyne Amplifier Controls (Node 0x510)</h1>
95     <div class="divTable">
96     <div class="divTableBody">
97     <div class="divTableRow">
98     <div class="divTableCell">&nbsp;</div>
99     <div class="divTableCell">Volume (0x100)</div>
100     <div class="divTableCell">Bass (0x101)</div>
101     <div class="divTableCell">Treble (0x102)</div>
102     <div class="divTableCell">Mid (0x103)</div>
103     <div class="divTableCell">Balance (0x0104)</div>
104     <div class="divTableCell">Fade (0x105)</div>
105     <!--<div class="divTableCell">SmartEqPoints (0x108)</div>-->
106     <div class="divTableCell">Mute (0x109)</div>
107     <!--div class="divTableCell">&nbsp;</div>
108     <div class="divTableCell">&nbsp;</div-->
109     </div>
110     <div class="divTableRow">
111     <div class="divTableCell">Max</div>
112     <div class="divTableCell"><button class="ucsCtrlButton" onclick="callbinder('UNICENS','sendmessage', {node: 0x510, msgid: 0x100, data:'AP8='})">MaxVolume</button></div><!--[0x00,0xFF]-->
113     <div class="divTableCell"><button class="ucsCtrlButton" onclick="callbinder('UNICENS','sendmessage', {node: 0x510, msgid: 0x101, data:'AA8='})">MaxBass</button></div><!--[0x00,15]-->
114     <div class="divTableCell"><button class="ucsCtrlButton" onclick="callbinder('UNICENS','sendmessage', {node: 0x510, msgid: 0x102, data:'AA8='})">MaxTreble</button></div><!--[0x00,15]-->
115     <div class="divTableCell"><button class="ucsCtrlButton" onclick="callbinder('UNICENS','sendmessage', {node: 0x510, msgid: 0x103, data:'AA8='})">MaxMid</button></div><!--[0x00,15]-->
116     <div class="divTableCell"><button class="ucsCtrlButton" onclick="callbinder('UNICENS','sendmessage', {node: 0x510, msgid: 0x104, data:'AI8='})">Full Left</button></div><!--[0x00,-15]-->
117     <div class="divTableCell"><button class="ucsCtrlButton" onclick="callbinder('UNICENS','sendmessage', {node: 0x510, msgid: 0x105, data:'AA8='})">Full Forward</button></div><!--[0x00,15]-->
118     <!--<div class="divTableCell">
119          <ol>
120               <li><button onclick="pushCurve(0xFF,1)">Test HIGH Curve</button></li>
121               <li><button onclick="pushCurve(0xFF,2)">Test HIGH Curve</button></li>
122               <li><button onclick="pushCurve(0xFF,3)">Test HIGH Curve</button></li>
123               <li><button onclick="pushCurve(0xFF,4)">Test HIGH Curve</button></li>
124          </ol>
125     </div>-->
126     <div class="divTableCell"><button class="ucsCtrlButton" onclick="callbinder('UNICENS','sendmessage', {node: 0x510, msgid: 0x109, data:'AAE='})">Mute</button></div><!--data:[0x00,1]-->
127     <!--div class="divTableCell">&nbsp;</div>
128     <div class="divTableCell">&nbsp;</div-->
129     </div>
130
131     <div class="divTableRow">
132     <div class="divTableCell">Middle</div>
133     <div class="divTableCell"><button class="ucsCtrlButton" onclick="callbinder('UNICENS','sendmessage', {node: 0x510, msgid: 0x100, data:'AO8='})">MidVolume</button></div><!--[0x00,0xEF]-->
134     <div class="divTableCell"><button class="ucsCtrlButton" onclick="callbinder('UNICENS','sendmessage', {node: 0x510, msgid: 0x101, data:'AAA='})">MidBass</button></div><!--[0x00,0]-->
135     <div class="divTableCell"><button class="ucsCtrlButton" onclick="callbinder('UNICENS','sendmessage', {node: 0x510, msgid: 0x102, data:'AAA='})">MidTreble</button></div><!--[0x00,0]-->
136     <div class="divTableCell"><button class="ucsCtrlButton" onclick="callbinder('UNICENS','sendmessage', {node: 0x510, msgid: 0x103, data:'AAA='})">MidMid</button></div><!--[0x00,0]-->
137     <div class="divTableCell"><button class="ucsCtrlButton" onclick="callbinder('UNICENS','sendmessage', {node: 0x510, msgid: 0x104, data:'AAA='})">Center Balance</button></div><!--[0x00,0]-->
138     <div class="divTableCell"><button class="ucsCtrlButton" onclick="callbinder('UNICENS','sendmessage', {node: 0x510, msgid: 0x105, data:'AAA='})">Center Fade</button></div><!--[0x00,0]-->
139     <!--<div class="divTableCell">
140          <ol>
141          <li><button onclick="pushCurve(0xE7,1)">Test MID Curve</button></li>
142          <li><button onclick="pushCurve(0xE7,2)">Test MID Curve</button></li>
143          <li><button onclick="pushCurve(0xE7,3)">Test MID Curve</button></li>
144          <li><button onclick="pushCurve(0xE7,4)">Test MID Curve</button></li>
145          </ol>
146        </div>-->
147     <div class="divTableCell"><button class="ucsCtrlButton" onclick="callbinder('UNICENS','sendmessage', {node: 0x510, msgid: 0x109, data:'AAA='})">Unmute</button></div><!--[0x00,0]-->
148     <!--div class="divTableCell">&nbsp;</div>
149     <div class="divTableCell">&nbsp;</div-->
150     </div>
151     <div class="divTableRow">
152     <div class="divTableCell">Min</div>
153     <div class="divTableCell"><button class="ucsCtrlButton" onclick="callbinder('UNICENS','sendmessage', {node: 0x510, msgid: 0x100, data:'AAA='})">MinVolume</button></div><!--[0x00,0x00]-->
154     <div class="divTableCell"><button class="ucsCtrlButton" onclick="callbinder('UNICENS','sendmessage', {node: 0x510, msgid: 0x101, data:'AI8='})">MinBass</button></div><!--[0x00,-15]-->
155     <div class="divTableCell"><button class="ucsCtrlButton" onclick="callbinder('UNICENS','sendmessage', {node: 0x510, msgid: 0x102, data:'AI8='})">MinTreble</button></div><!--[0x00,-15]-->
156     <div class="divTableCell"><button class="ucsCtrlButton" onclick="callbinder('UNICENS','sendmessage', {node: 0x510, msgid: 0x103, data:'AI8='})">MinMidRange</button></div><!--[0x00,-15]-->
157     <div class="divTableCell"><button class="ucsCtrlButton" onclick="callbinder('UNICENS','sendmessage', {node: 0x510, msgid: 0x104, data:'AA8='})">Full Right</button></div><!--[0x00,15]-->
158     <div class="divTableCell"><button class="ucsCtrlButton" onclick="callbinder('UNICENS','sendmessage', {node: 0x510, msgid: 0x105, data:'AI8='})">Full Rear</button></div><!--[0x00,-15]-->
159     <!--<div class="divTableCell">
160         <ol>
161           <li><button onclick="pushCurve(0,1)">Test LOW Curve</button></li>
162           <li><button onclick="pushCurve(0,2)">Test LOW Curve</button></li>
163           <li><button onclick="pushCurve(0,3)">Test LOW Curve</button></li>
164           <li><button onclick="pushCurve(0,4)">Test LOW Curve</button></li>
165         </ol>
166     </div>-->
167     <div class="divTableCell">&nbsp;</div>
168     <!--div class="divTableCell">&nbsp;</div>
169     <div class="divTableCell">&nbsp;</div-->
170     </div>
171     </div>
172     </div>
173
174     <h1>Events</h1>
175     <br>
176     <div id="main" style="visibility:hidden">
177     <ol>
178     <li>Question <pre id="question"></pre>
179     <li>Response <pre id="output"></pre>
180     <li>Events: <pre id="outevt"></pre>
181     </ol>
182     </div>
183 </body>