From 8372df36b5d9feb92a5c26e336d7e8375227b77c Mon Sep 17 00:00:00 2001 From: Brian Thorne Date: Tue, 28 Jul 2020 17:04:35 +1200 Subject: [PATCH] Delete unused MultiRateCyclicSendTaskABC --- can/__init__.py | 1 - can/broadcastmanager.py | 28 +--------------------------- 2 files changed, 1 insertion(+), 28 deletions(-) diff --git a/can/__init__.py b/can/__init__.py index 39605b57e..d8301659f 100644 --- a/can/__init__.py +++ b/can/__init__.py @@ -46,6 +46,5 @@ class CanError(IOError): CyclicSendTaskABC, LimitedDurationCyclicSendTaskABC, ModifiableCyclicTaskABC, - MultiRateCyclicSendTaskABC, RestartableCyclicTaskABC, ) diff --git a/can/broadcastmanager.py b/can/broadcastmanager.py index 173727789..8e03fadee 100644 --- a/can/broadcastmanager.py +++ b/can/broadcastmanager.py @@ -169,32 +169,6 @@ def modify_data(self, messages: Union[Sequence[Message], Message]): self.messages = messages -class MultiRateCyclicSendTaskABC(CyclicSendTaskABC): - """A Cyclic send task that supports switches send frequency after a set time. - """ - - def __init__( - self, - channel: typechecking.Channel, - messages: Union[Sequence[Message], Message], - count: int, - initial_period: float, - subsequent_period: float, - ): - """ - Transmits a message `count` times at `initial_period` then continues to - transmit messages at `subsequent_period`. - - :param channel: See interface specific documentation. - :param messages: - :param count: - :param initial_period: - :param subsequent_period: - """ - super().__init__(messages, subsequent_period) - self._channel = channel - - class ThreadBasedCyclicSendTask( ModifiableCyclicTaskABC, LimitedDurationCyclicSendTaskABC, RestartableCyclicTaskABC ): @@ -213,7 +187,7 @@ def __init__( The `on_error` is called if any error happens on `bus` while sending `messages`. If `on_error` present, and returns ``False`` when invoked, thread is - stopped immediately, otherwise, thread continuiously tries to send `messages` + stopped immediately, otherwise, thread continuously tries to send `messages` ignoring errors on a `bus`. Absence of `on_error` means that thread exits immediately on error.