Skip to content

Streaming Telemetry and Large Payloads

For very large or continuous data (logs, firmware blobs, large configuration blocks) you should not push individual values via set<>(). Instead, use the streaming API on flake::Service:

  • openProperty(uint32_t propTag, Stream** stream)
  • onRead, onWrite, onOpenClose for streaming callbacks

Basic pattern (sender side):

cpp
Stream* s = nullptr;
int rc = service->openProperty<LOG_STREAM>(&s);
if (rc == E_OK && s != nullptr) {
    // write data via s->write(...) inside your stream callbacks
}

Typical use cases:

  • Live log streams
  • File-like transfers (config snapshots, diagnostic bundles)
  • Chunked binary data

The exact usage pattern depends on your generated stream-capable properties and your Stream implementation; see the generic Flake streaming documentation for details.