coupler: check heart beats asynchronously.
Instead of sampling the received heart beat (monitored item) and checking all watched couplers on a fixed interval:
- handle each received heart beat at once, from an onWrite callback of the subscribed variable which the DataSetReader writes for every message,
- detect the loss of a watched coupler with a per coupler watchdog, a one shot timer due HEART_BEAT_TIMEOUT_INTERVAL after its last heart beat and re-armed by each heart beat.
Loss is now detected right at the timeout (was up to one check interval later) and recovery on the first heart beat. With several watched couplers the coupler is UP only if all of them are alive and goes DOWN as soon as one times out (the interval check flipped between DOWN and UP).
Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com