tahamajs/CPS / Files /ComputerAssignments /CA2 /PROTOCOL_COMPLIANCE_REPORT.md
tahamajs's picture
|
download
raw
2.65 kB
# Air Mouse Pro — Protocol Compliance & Wire Specification Report
**Generated:** 2026-07-26 05:12:52
**Protocol Version:** 3.0
**Transport:** TCP (Port 9090/8080), WebSocket (Port 9091), UDP (Port 9092)
---
## 1. Protocol Architecture & ACK Model
AirMouse Pro utilizes newline-delimited JSON streaming over TCP sockets for high-frequency motion and gesture data.
- **ACK Retransmission:** Reliable event frames (`click`, `scroll`, `control`, `orientation`) require server ACK within 500ms with up to 3 retries.
- **Unreliable Stream:** High-frequency `move` packets are non-blocking to minimize latency.
---
## 2. Test Execution Matrix
| Test Case | Message Type | Target Socket | Status | Latency / Notes |
|---|---|---|---|---|
| Handshake (`hello`) | `hello` | TCP Stream | ✅ ok | Device metadata registered |
| Heartbeat Ping (`ping`) | `ping` | TCP Socket | ✅ ok | Pong received |
| RTT Measurement (`rtt_ms`) | `ping`/`pong` | TCP Socket | ✅ ok | RTT measured ~1ms |
| Cursor Move (`move`) | `move` | TCP Socket | ✅ ok | dx/dy deltas dispatched |
| Left Click (`click`) | `click` | TCP Socket | ✅ ok | ACK received |
| Double Click (`double_click`)| `doubleclick`| TCP Socket | ✅ ok | ACK received |
| Right Click (`right_click`) | `rightclick` | TCP Socket | ✅ ok | ACK received |
| Scroll Event (`scroll`) | `scroll` | TCP Socket | ✅ ok | ACK received |
| Orientation (`orientation`)| `orientation`| TCP Socket | ✅ ok | Roll/Pitch/Yaw processed |
| Battery Status (`battery`) | `battery` | TCP Socket | ✅ ok | Battery level updated |
| Proximity Event (`proximity`)| `proximity` | TCP Socket | ✅ ok | Proximity threshold checked |
| Volume Up (`cmd_volume_up`) | `control` | TCP Socket | ✅ ok | System command executed |
| Volume Down (`cmd_volume_down`)| `control`| TCP Socket | ✅ ok | System command executed |
| Mute (`cmd_mute`) | `control` | TCP Socket | ✅ ok | System command executed |
| Play/Pause (`cmd_play_pause`)| `control` | TCP Socket | ✅ ok | System command executed |
---
## 3. Wire Protocol Message Schemas
### 3.1 Handshake (`hello`)
```json
{
"type": "hello",
"id": "uuid-v4",
"device_id": "android-device-id",
"name": "Air Mouse Phone",
"version": "3.0.0",
"model": "Pixel 8",
"android_version": "14",
"transport": "tcp"
}
```
### 3.2 Cursor Movement (`move`)
```json
{
"type": "move",
"dx": 12.5,
"dy": -8.2
}
```
### 3.3 Reliable Click Gesture (`click`)
```json
{
"type": "click",
"id": "ack_001",
"button": "left"
}
```
**Server ACK Response:** `{"type": "ack", "id": "ack_001"}`
---
## 4. Compliance Summary
**15/15 tests passed (100% PASS)**

Xet Storage Details

Size:
2.65 kB
·
Xet hash:
cf39d87c7b81fef39b842e03a2d90a0b5f0af87d310c68e3d516f862cfcf4b98

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