STUB DOCUMENT: This page is intentionally minimal and will be expanded with deeper technical details in a future update.
@cw.on_synchronized is an approximate time synchronizer for edge workers that need to fuse data from multiple sensors with temporal guarantees.
Usage
Callback signature
How it works
- For each channel in the list, a separate data-layer subscription is created.
- A shared
latest_samples buffer (one entry per channel) is maintained under a lock.
- On each incoming sample the buffer is updated, then checked: if all channels are present and
max(timestamps) - min(timestamps) <= tolerance_ms / 1000, the callback fires with a copy of the buffer.
- Exceptions in the callback are logged; the runtime continues.
Cross-twin mode
For multi-camera or cross-device fusion, use twin_channels to synchronize channels from different twins:
The single-twin API (@cw.on_synchronized(twin_uuid, channels)) continues to work unchanged.
See Multi-Camera Detection Routing for an end-to-end example.
Comparison with latest(max_age_ms=)
Temporal sync roadmap