X-Git-Url: https://git.giacomolli.uk/onehouse/blobdiff_plain/2015860819c6228bf5ec708a48e5ca9b7c04e27d..a5486293282c47e6bca115c05ddde6e39ba4930c:/doc/driver.rst diff --git a/doc/driver.rst b/doc/driver.rst index 33086f1..00b062a 100644 --- a/doc/driver.rst +++ b/doc/driver.rst @@ -14,3 +14,35 @@ SIGTERM and finishes cleanup before exit. No integration or broker runs. Tests use fake drivers. They do not verify a broker or a physical device. + +****************** + Typed publishing +****************** + +``Publisher`` takes a ``Transport`` with one ``Publish`` operation on +``protocol.Publication``. No broker client or topic operation belongs in +the framework. Typed methods cover descriptor, availability, reported +values, telemetry, events, and results. Missing message IDs and +observation times use fresh values. Supplied metadata remains subject to +protocol validation. + +Equal retained payloads are suppressed. Correlation and causation bypass +suppression. A changed telemetry sample uses QoS 0 without retention. +Its latest complete value supplies a QoS 1 retained reported snapshot at +the five-minute repeat or reconnect, not on every change. Repeats keep +observation times, use fresh IDs, and omit command correlation and +causation. JSON object key order and whitespace do not change equality. +Measurement topics are independent. Boolean reported state does not +repeat unless telemetry marks that point as a measurement. Online +availability repeats every five minutes. Offline availability, +descriptors, and Boolean state repeat on reconnect only. Expiring +values, events, and results are not suppressed or cached. + +Run one publisher alongside the integration drivers. Its methods are +safe for concurrent use and copy caller-owned payloads and timestamp +pointers. Each send has a five-second timeout derived from the caller +context. A background send error returns to the runner rather than being +logged by the publisher. Reconnect refresh requests are nonblocking and +coalesce while pending. The cache is memory-only. Tests use a fake +transport and simulated time. They do not verify MQTT acknowledgement or +a broker reconnect.