pub enum ServerToEdge {
ConfigFull {
config: EdgeConfig,
},
ConfigPatch {
mapping_id: Uuid,
op: PatchOp,
mapping: Option<Mapping>,
},
TargetSwitch {
mapping_id: Uuid,
service_target: String,
},
GlyphsUpdate {
glyphs: Vec<Glyph>,
},
DisplayGlyph {
device_type: String,
device_id: String,
pattern: String,
brightness: Option<f32>,
timeout_ms: Option<u32>,
transition: Option<String>,
},
DeviceConnect {
device_type: String,
device_id: String,
},
DeviceDisconnect {
device_type: String,
device_id: String,
},
DispatchIntent {
service_type: String,
service_target: String,
intent: String,
params: Value,
output_id: Option<String>,
},
DeviceCyclePatch {
cycle: DeviceCycle,
op: PatchOp,
},
SwitchActiveConnection {
device_type: String,
device_id: String,
active_mapping_id: Uuid,
},
ServiceState {
edge_id: String,
service_type: String,
target: String,
property: String,
output_id: Option<String>,
value: Value,
},
Ping,
}Expand description
Frames sent from weave-server to an edge-agent.
Variants§
ConfigFull
Full config snapshot. Sent on (re)connect and on bulk reload.
Fields
config: EdgeConfigConfigPatch
Incremental mapping change.
TargetSwitch
Server-initiated active-target switch for an existing mapping.
GlyphsUpdate
Replace the edge’s glyph set. Sent after any glyph CRUD on the server.
DisplayGlyph
Render a glyph on a specific device immediately. Used by the weave-web “Test LED” affordance to verify a device’s display path without waiting for a service-state event.
Fields
pattern: String9-line ASCII grid (* = on, anything else = off). Matches
the Glyph::pattern shape used in GlyphsUpdate.
DeviceConnect
Server-initiated request to (re)connect a specific device. Idempotent — already-connected devices are a no-op aside from clearing any “paused” state that previously suppressed reconnect attempts.
DeviceDisconnect
Server-initiated request to disconnect a specific device. Sets a paused flag so the auto-reconnect loop does not immediately re-establish the link.
DispatchIntent
Server-forwarded intent dispatch. The originating edge routed an
input but lacked the adapter for service_type; the server
looked up an edge whose Hello capabilities include service_type
and forwarded the intent here. The receiving edge feeds the
payload into its existing dispatcher (same path the local
routing engine uses) so an EdgeToServer::Command telemetry
frame still emits with the actual outcome.
Wire shape mirrors EdgeToServer::Command (intent name + params)
so receivers can reuse the same Intent reassembly logic both
for self-routed intents and forwarded ones.
Fields
DeviceCyclePatch
Incremental cycle change for one device. Sent to the edge that owns
the device whenever the server applies a cycle CRUD operation.
op == Delete removes the cycle on the edge (mappings revert to the
no-cycle “fire all matching” behavior).
SwitchActiveConnection
Server-initiated active-connection switch for a device’s cycle. The
receiving edge updates its local cycle snapshot and routes input
only through active_mapping_id going forward (until the next
switch). Originates from a REST POST .../cycle/switch, an
EdgeToServer::SwitchActiveConnection from a peer edge that
observed the cycle gesture, or an automatic advance.
ServiceState
Echo of a service state update originally published by another
edge. weave-server fans out EdgeToServer::State to every other
connected edge so locally-mapped Nuimos can render LED feedback
for services the edge itself doesn’t dispatch (cross-edge
scenario: iPad maps Nuimo → Roon, but Roon adapter lives on a
peer edge). Receiver feeds this directly into its local feedback
pump as a StateUpdate. The edge_id carries the originating
edge so receivers can ignore loop-backs (server already filters
the source out, but the field is useful for diagnostics).
Fields
Ping
Periodic keepalive to keep NAT/proxies open and detect half-open TCP.
Trait Implementations§
Source§impl Clone for ServerToEdge
impl Clone for ServerToEdge
Source§fn clone(&self) -> ServerToEdge
fn clone(&self) -> ServerToEdge
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more