tahamajs/CPS / Files /ComputerAssignments /CA2 /PROTOCOL_COMPLIANCE_REPORT.html
tahamajs's picture
download
raw
5.56 kB
<!DOCTYPE html>
<html lang="fa" dir="rtl">
<head>
<meta charset="utf-8">
<title>PROTOCOL_COMPLIANCE_REPORT</title>
<style>
body { font-family: Tahoma, 'Segoe UI', sans-serif; line-height: 2.0; font-size: 11pt; color: #0f172a; padding: 30px; background-color: #ffffff; }
h1 { color: #1e1b4b; border-bottom: 3px solid #4f46e5; padding-bottom: 10px; font-size: 22pt; margin-top: 30px; }
h2 { color: #1e293b; background-color: #f1f5f9; border-right: 5px solid #3b82f6; padding: 8px 12px; font-size: 16pt; margin-top: 25px; }
h3 { color: #2563eb; font-size: 13pt; margin-top: 20px; }
p { text-align: justify; margin-bottom: 15px; }
pre { background-color: #0f172a; color: #f8fafc; padding: 15px; border-radius: 6px; font-family: Courier, monospace; font-size: 10pt; overflow-x: auto; }
code { background-color: #f1f5f9; color: #0f172a; padding: 2px 5px; border-radius: 4px; font-family: Courier, monospace; }
table { border-collapse: collapse; width: 100%; margin: 20px 0; }
th, td { border: 1px solid #cbd5e1; padding: 10px; text-align: right; }
th { background-color: #f1f5f9; }
ul, ol { padding-right: 25px; }
</style>
</head>
<body>
<div class="container">
<h1>Air Mouse Pro — Protocol Compliance &amp; Wire Specification Report</h1>
<p><strong>Generated:</strong> 2026-07-26 05:12:52<br />
<strong>Protocol Version:</strong> 3.0<br />
<strong>Transport:</strong> TCP (Port 9090/8080), WebSocket (Port 9091), UDP (Port 9092) </p>
<hr />
<h2>1. Protocol Architecture &amp; ACK Model</h2>
<p>AirMouse Pro utilizes newline-delimited JSON streaming over TCP sockets for high-frequency motion and gesture data.
- <strong>ACK Retransmission:</strong> Reliable event frames (<code>click</code>, <code>scroll</code>, <code>control</code>, <code>orientation</code>) require server ACK within 500ms with up to 3 retries.
- <strong>Unreliable Stream:</strong> High-frequency <code>move</code> packets are non-blocking to minimize latency.</p>
<hr />
<h2>2. Test Execution Matrix</h2>
<table>
<thead>
<tr>
<th>Test Case</th>
<th>Message Type</th>
<th>Target Socket</th>
<th>Status</th>
<th>Latency / Notes</th>
</tr>
</thead>
<tbody>
<tr>
<td>Handshake (<code>hello</code>)</td>
<td><code>hello</code></td>
<td>TCP Stream</td>
<td>✅ ok</td>
<td>Device metadata registered</td>
</tr>
<tr>
<td>Heartbeat Ping (<code>ping</code>)</td>
<td><code>ping</code></td>
<td>TCP Socket</td>
<td>✅ ok</td>
<td>Pong received</td>
</tr>
<tr>
<td>RTT Measurement (<code>rtt_ms</code>)</td>
<td><code>ping</code>/<code>pong</code></td>
<td>TCP Socket</td>
<td>✅ ok</td>
<td>RTT measured ~1ms</td>
</tr>
<tr>
<td>Cursor Move (<code>move</code>)</td>
<td><code>move</code></td>
<td>TCP Socket</td>
<td>✅ ok</td>
<td>dx/dy deltas dispatched</td>
</tr>
<tr>
<td>Left Click (<code>click</code>)</td>
<td><code>click</code></td>
<td>TCP Socket</td>
<td>✅ ok</td>
<td>ACK received</td>
</tr>
<tr>
<td>Double Click (<code>double_click</code>)</td>
<td><code>doubleclick</code></td>
<td>TCP Socket</td>
<td>✅ ok</td>
<td>ACK received</td>
</tr>
<tr>
<td>Right Click (<code>right_click</code>)</td>
<td><code>rightclick</code></td>
<td>TCP Socket</td>
<td>✅ ok</td>
<td>ACK received</td>
</tr>
<tr>
<td>Scroll Event (<code>scroll</code>)</td>
<td><code>scroll</code></td>
<td>TCP Socket</td>
<td>✅ ok</td>
<td>ACK received</td>
</tr>
<tr>
<td>Orientation (<code>orientation</code>)</td>
<td><code>orientation</code></td>
<td>TCP Socket</td>
<td>✅ ok</td>
<td>Roll/Pitch/Yaw processed</td>
</tr>
<tr>
<td>Battery Status (<code>battery</code>)</td>
<td><code>battery</code></td>
<td>TCP Socket</td>
<td>✅ ok</td>
<td>Battery level updated</td>
</tr>
<tr>
<td>Proximity Event (<code>proximity</code>)</td>
<td><code>proximity</code></td>
<td>TCP Socket</td>
<td>✅ ok</td>
<td>Proximity threshold checked</td>
</tr>
<tr>
<td>Volume Up (<code>cmd_volume_up</code>)</td>
<td><code>control</code></td>
<td>TCP Socket</td>
<td>✅ ok</td>
<td>System command executed</td>
</tr>
<tr>
<td>Volume Down (<code>cmd_volume_down</code>)</td>
<td><code>control</code></td>
<td>TCP Socket</td>
<td>✅ ok</td>
<td>System command executed</td>
</tr>
<tr>
<td>Mute (<code>cmd_mute</code>)</td>
<td><code>control</code></td>
<td>TCP Socket</td>
<td>✅ ok</td>
<td>System command executed</td>
</tr>
<tr>
<td>Play/Pause (<code>cmd_play_pause</code>)</td>
<td><code>control</code></td>
<td>TCP Socket</td>
<td>✅ ok</td>
<td>System command executed</td>
</tr>
</tbody>
</table>
<hr />
<h2>3. Wire Protocol Message Schemas</h2>
<h3>3.1 Handshake (<code>hello</code>)</h3>
<pre><code class="language-json">{
&quot;type&quot;: &quot;hello&quot;,
&quot;id&quot;: &quot;uuid-v4&quot;,
&quot;device_id&quot;: &quot;android-device-id&quot;,
&quot;name&quot;: &quot;Air Mouse Phone&quot;,
&quot;version&quot;: &quot;3.0.0&quot;,
&quot;model&quot;: &quot;Pixel 8&quot;,
&quot;android_version&quot;: &quot;14&quot;,
&quot;transport&quot;: &quot;tcp&quot;
}
</code></pre>
<h3>3.2 Cursor Movement (<code>move</code>)</h3>
<pre><code class="language-json">{
&quot;type&quot;: &quot;move&quot;,
&quot;dx&quot;: 12.5,
&quot;dy&quot;: -8.2
}
</code></pre>
<h3>3.3 Reliable Click Gesture (<code>click</code>)</h3>
<pre><code class="language-json">{
&quot;type&quot;: &quot;click&quot;,
&quot;id&quot;: &quot;ack_001&quot;,
&quot;button&quot;: &quot;left&quot;
}
</code></pre>
<p><strong>Server ACK Response:</strong> <code>{"type": "ack", "id": "ack_001"}</code></p>
<hr />
<h2>4. Compliance Summary</h2>
<p><strong>15/15 tests passed (100% PASS)</strong></p>
</div>
</body>
</html>

Xet Storage Details

Size:
5.56 kB
·
Xet hash:
2d7936902b480980123fa1839f262ca5cb66ce04082ee9b4f44af30e51532790

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.