Expand description
Probing a port: is there a Z-Wave controller, and which?
The probe writes a NAK (harmless; it only asks a controller to drop a
partial frame) and GET_SERIAL_API_CAPABILITIES, which only reads. Only
if that is answered like a Z-Wave controller does it ask a few more
read-only questions (version, controller id, init data, controller
capabilities, RF region). Nothing writes the controller’s memory, changes
its state or resets it. The whole probe is bounded by PROBE_TIMEOUT
and the port is closed when it returns, so a device that is not a Z-Wave
controller sees a handful of bytes and nothing more.
Structs§
- Controller
Identity - What answered on the port.
Enums§
- Series
- The controller chip’s series.
Constants§
- PROBE_
TIMEOUT - Upper bound on a whole probe.
Functions§
- identify
- Identifies the controller behind a running link with read-only
requests (capabilities, version, controller id, init data, controller
capabilities, RF region);
Noneif it does not answer like one. - known_
name - Names of a few common sticks, by (manufacturer, product type, product id).
- probe
- Opens
path(a device ortcp://host:port) and probes it. - probe_
blocking probefor callers without an async runtime: runs on a private current-thread runtime, which is dropped (closing the port) before it returns.- probe_
port - Probes an open port.
Ok(None)means nothing answered like a Z-Wave controller;Erris an I/O failure. The port is closed on return.