Added a connection status element that shows current link usage and packet loss.
This commit is contained in:
1 parent
26c29df4ad
commit
2d91487c6a
12 files changed
+415
No files matched your search
@@ -0,0 +1,16 @@
|
||||
# Link panel
|
||||
|
||||
Run `scenes/link_demo.tscn` with F6. The controls preview connected, near-capacity, saturated, degraded, disconnected, stale and missing telemetry, plus both themes.
|
||||
|
||||
```gdscript
|
||||
$LinkPanel.set_telemetry(6.42, 1.08, 0.02, 0)
|
||||
# down/up: Gbps; packet loss: percent; state: 0 connected, 1 degraded, 2 disconnected
|
||||
```
|
||||
|
||||
Capacity defaults to 10 Gbps per direction. Arc and direction colors change at 80% and 95%; these thresholds and capacities are configurable. Numeric readings stay in the normal text color and remain unclamped above capacity. Utilization does not change the reported connection state.
|
||||
|
||||
`loss_window_seconds` describes the supplied loss measurement (default 10 s); compute that measurement upstream. Disconnected and missing telemetry show dashes. After `stale_after_seconds` (default 2), values are held with a STALE label. Invalid or non-finite samples are rejected. `clear_telemetry()` restores the missing-data state.
|
||||
|
||||
Layout and text are scene nodes; `link_rate.gd` only draws the utilization arcs. `link_icon` selects the subdued SVG watermark. The current local chain-link drawing is a draft. Colors come from the shared theme.
|
||||
|
||||
The panel replaces the Link placeholder in both layouts and the element library. Existing JSON layouts keep their `link` type IDs. Camera and telemetry transports are not connected by this prototype.
|
||||
Reference in new issue
Block a user