@@ -246,46 +246,41 @@ class Miss:
246246@_unstable
247247@final
248248class MissDetectionConfig :
249- @overload
250- def __new__ (cls ) -> Self : ...
251- @overload
252- def __new__ (cls , * , heartbeat : float | int ) -> Self :
249+ def __new__ (
250+ cls , * , heartbeat : float | int | None , sporadic_heartbeat : float | int | None
251+ ) -> Self :
253252 """
254253 :param heartbeat: period in seconds, allow last sample miss detection through periodic heartbeat;
255- periodically send the last published Sample's sequence number to allow last sample recovery
256- `AdvancedSubscriber`(crate::AdvancedSubscriber) can recover the last sample with the `heartbeat` option
257- """
254+ periodically send the last published Sample's sequence number to allow last sample recovery.
255+ `AdvancedSubscriber can only recover the last sample with the `heartbeat` option enabled.
256+ This option can not be enabled simultaneously with `sporadic_heartbeat`.
258257
259- @overload
260- def __new__ (cls , sporadic_heartbeat : float | int ) -> Self :
261- """
262258 :param sporadic_heartbeat: period in seconds, allow last sample miss detection through sporadic heartbeat;
263259 each period, the last published Sample's sequence number is sent with `CongestionControl.Block` but only if
264260 it has changed since the last period.
261+ `AdvancedSubscriber can only recover the last sample with the `heartbeat` option enabled.
262+ This option can not be enabled simultaneously with `heartbeat`.
265263 """
266264
267265@_unstable
268266@final
269267class RecoveryConfig :
270- @overload
271- def __new__ (cls ) -> Self : ...
272- @overload
273- def __new__ (cls , * , periodic_queries : float | int ) -> Self :
268+ def __new__ (
269+ cls , * , periodic_queries : float | int | None , heartbeat : Literal [True ] | None
270+ ) -> Self :
274271 """
275272 :param periodic_queries: enable periodic queries for not yet received Samples and specify their period;
276273 it allows retrieving the last Sample(s) if the last Sample(s) is/are lost,
277274 so it is useful for sporadic publications but useless for periodic publications
278- with a period smaller or equal to this period
279- retransmission can only be achieved by `AdvancedPublisher` that enable `cache` and `sample_miss_detection`
280- """
275+ with a period smaller or equal to this period.
276+ Retransmission can only be achieved by `AdvancedPublisher` that enable `cache` and `sample_miss_detection`.
277+ This option can not be enabled simultaneously with `heartbeat`.
281278
282- @overload
283- def __new__ (cls , * , heartbeat : Literal [True ]) -> Self :
284- """
285279 :param heartbeat: subscribe to heartbeats of `AdvancedPublisher`;
286- it allows receiving the last published Sample's sequence number and check for misses
287- heartbeat subscriber must be paired with `AdvancedPublishers` that enable `cache` and
288- `sample_miss_detection` with `heartbeat` or `sporadic_heartbeat`
280+ it allows receiving the last published Sample's sequence number and check for misses.
281+ Heartbeat subscriber must be paired with `AdvancedPublishers` that enable `cache` and
282+ `sample_miss_detection` with `heartbeat` or `sporadic_heartbeat`.
283+ This option can not be enabled simultaneously with `periodic_queries`.
289284 """
290285
291286@_unstable
@@ -302,7 +297,6 @@ class RepliesConfig:
302297@_unstable
303298@final
304299class SampleMissListener (Generic [_H ]):
305- @property
306300 def undeclare (self ): ...
307301 @overload
308302 def try_recv (self : SampleMissListener [Handler [Miss ]]) -> Miss | None : ...
0 commit comments