- Python 100%
| schema | ||
| src/ledmgr/server | ||
| tests | ||
| .gitignore | ||
| LICENSE | ||
| pyproject.toml | ||
| README.md | ||
| requirements.txt | ||
| THIRD-PARTY | ||
Client API
Version: 2
The API has 2 distinct protocols:
- for getting device information
- receiving data from the client
Device information API
HTTP API on the same port as the data protocol
Endpoints
GET /query-name/<name>
GET /window-info?screen=<screen_id>&window=<window_id>
Data protocol (DP)
The server accepts data via UDP on a configurable port.
Byte 0 of a packet is the packet identifier. Its value is always
0x45. If byte 0 is not the expected value, the server drops the
packet.
Byte 1 is the packet type
| Value | Description | Max. data bytes (1500 mtu) |
|---|---|---|
| 0x80 | RGBA data packet | 1400 |
| 0x81 | RGBA render command | - |
| 0x90 | Passthrough packet (passed to device driver without modification) | 1468 |
| 0xff | Tell the server to reload all devices | - |
The maximum number of bytes is not enforced, but it is not recommended to exceed it due to packet fragmentation. If the maximum data length is exceeded, the server will log a warning
RGBA Data
| Byte # | Description |
|---|---|
| 2 | Screen number (0-255) |
| 3 | Window number (0-255) |
| 4 | Insert offset high byte |
| 5 | Insert offset low byte |
| 6-1405 | RGBA data (0-350 pixels) |
RGBA render command
Tells the server to render all windows on a screen and output the result to the driver. The render command is a separate packet type by design to allow large screens to be used without spamming the target device with packets. Also, can improve screen tear.
| Byte # | Description |
|---|---|
| 2 | Screen number (0-255) |
Passthrough packet
Passes the packet's data segment directly to the device driver.
| Byte # | Description |
|---|---|
| 2 | Device number (0-255) |
| 3-1471 | Data |