@@ -66,10 +66,8 @@ def __init__(
66
66
Any backend dependent configurations are passed in this dictionary
67
67
68
68
:raises ValueError: If parameters are out of range
69
- :raises ~can.exceptions.CanInterfaceNotImplementedError:
70
- If the driver cannot be accessed
71
- :raises ~can.exceptions.CanInitializationError:
72
- If the bus cannot be initialized
69
+ :raises can.CanInterfaceNotImplementedError: If the driver cannot be accessed
70
+ :raises can.CanInitializationError: If the bus cannot be initialized
73
71
"""
74
72
self ._periodic_tasks : List [_SelfRemovingCyclicTask ] = []
75
73
self .set_filters (can_filters )
@@ -83,11 +81,9 @@ def recv(self, timeout: Optional[float] = None) -> Optional[Message]:
83
81
:param timeout:
84
82
seconds to wait for a message or None to wait indefinitely
85
83
86
- :return:
87
- :obj:`None` on timeout or a :class:`~can.Message` object.
84
+ :return: ``None`` on timeout or a :class:`Message` object.
88
85
89
- :raises ~can.exceptions.CanOperationError:
90
- If an error occurred while reading
86
+ :raises can.CanOperationError: If an error occurred while reading
91
87
"""
92
88
start = time ()
93
89
time_left = timeout
@@ -152,8 +148,7 @@ def _recv_internal(
152
148
2. a bool that is True if message filtering has already
153
149
been done and else False
154
150
155
- :raises ~can.exceptions.CanOperationError:
156
- If an error occurred while reading
151
+ :raises can.CanOperationError: If an error occurred while reading
157
152
:raises NotImplementedError:
158
153
if the bus provides it's own :meth:`~can.BusABC.recv`
159
154
implementation (legacy implementation)
@@ -176,8 +171,7 @@ def send(self, msg: Message, timeout: Optional[float] = None) -> None:
176
171
Might not be supported by all interfaces.
177
172
None blocks indefinitely.
178
173
179
- :raises ~can.exceptions.CanOperationError:
180
- If an error occurred while sending
174
+ :raises can.CanOperationError: If an error occurred while sending
181
175
"""
182
176
raise NotImplementedError ("Trying to write to a readonly bus?" )
183
177
@@ -195,8 +189,8 @@ def send_periodic(
195
189
- the (optional) duration expires
196
190
- the Bus instance goes out of scope
197
191
- the Bus instance is shutdown
198
- - :meth:`stop_all_periodic_tasks` is called
199
- - the task's :meth:`~can.broadcastmanager. CyclicTask.stop` method is called.
192
+ - :meth:`BusABC. stop_all_periodic_tasks() ` is called
193
+ - the task's :meth:`CyclicTask.stop() ` method is called.
200
194
201
195
:param msgs:
202
196
Message(s) to transmit
@@ -210,8 +204,7 @@ def send_periodic(
210
204
Disable to instead manage tasks manually.
211
205
:return:
212
206
A started task instance. Note the task can be stopped (and depending on
213
- the backend modified) by calling the task's
214
- :meth:`~can.broadcastmanager.CyclicTask.stop` method.
207
+ the backend modified) by calling the task's :meth:`stop` method.
215
208
216
209
.. note::
217
210
@@ -281,8 +274,8 @@ def _send_periodic_internal(
281
274
no duration is provided, the task will continue indefinitely.
282
275
:return:
283
276
A started task instance. Note the task can be stopped (and
284
- depending on the backend modified) by calling the
285
- :meth:`~can.broadcastmanager.CyclicTask.stop` method.
277
+ depending on the backend modified) by calling the :meth:`stop`
278
+ method.
286
279
"""
287
280
if not hasattr (self , "_lock_send_periodic" ):
288
281
# Create a send lock for this bus, but not for buses which override this method
@@ -295,7 +288,7 @@ def _send_periodic_internal(
295
288
return task
296
289
297
290
def stop_all_periodic_tasks (self , remove_tasks : bool = True ) -> None :
298
- """Stop sending any messages that were started using :meth:` send_periodic` .
291
+ """Stop sending any messages that were started using **bus. send_periodic** .
299
292
300
293
.. note::
301
294
The result is undefined if a single task throws an exception while being stopped.
0 commit comments