Expand description
OWP 1.0 adapter: WebSocket text frames in, oa_gateway_core::Envelope out.
This crate is a server. Clients speak OWP over a text WebSocket; the
codec follows OMSC-SPC-013 and does not compile UCI. Conversion and
validation happen in the session when a schema and xml_baseline
are configured. The engine sees only envelopes.
OwpAdapter::run binds OwpConfig::bind and accepts until
cancelled. A failed bind is fatal for this adapter only.
Modules§
- codec 🔒OWP 1.0 text-frame codec. Grammar follows OMSC-SPC-013; no UCI types.
- config 🔒Listen address, INIT identity, and resource limits.
- convert 🔒JSON ↔ XML at the socket, plus A-GRA
EncodedPayloadhex. - server 🔒Accept loop and WebSocket handshake. Sessions live in
session. - session 🔒One WebSocket session: INIT, then PUB / SUB / UNSUB until close.
Structs§
- JSON body of a server
INFOframe. - JSON body of a client
INITframe. - OWP/WebSocket server adapter.
- Settings for one OWP listener.
Enums§
- A parsed client frame.
- Protocol error name carried on
-ERR. - A parsed server frame, or one about to be written.
Constants§
- Seconds with no frame in either direction on an active session before it is closed. Generous, since a subscriber to a low-rate topic is legitimately quiet on the inbound side and the server’s own MSG frames keep it alive.
- Seconds from an accepted WebSocket to a successful INIT before the session is closed. Without it a peer can hold a connection slot forever by connecting and never speaking OWP.
- Concurrent connections accepted before further ones are refused.
- Largest OWP frame accepted from a client, in bytes.
- Subscriptions allowed on one connection.
Functions§
- Whether
sis an OWP identifier:^[A-Za-z0-9_\-.]+$. - Parses one client text frame (
INIT,PUB,SUB,UNSUB). - Parses one server text frame (
+OK,-ERR,INFO,MSG). - Returns the single root key of an OMS JSON object.