You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/source/isotp/implementation.rst
+12-1Lines changed: 12 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -211,6 +211,17 @@ The transport layer ``params`` parameter must be a dictionary with the following
211
211
Refer to :ref:`Rate Limiter Section<rate_limiter_section>` for more details
212
212
213
213
214
+
.. _param_listen_mode:
215
+
216
+
.. attribute:: listen_mode
217
+
:annotation: (bool)
218
+
219
+
**default: False**
220
+
221
+
When Listen Mode is enabled, the :class:`TransportLayer<isotp.TransportLayer>` will correctly receive and transmit ISO-TP Frame, but will not send Flow Control
222
+
message when receiving a frame. This mode of operation is usefull to listen to a transmission between two third-party devices without interferring.
223
+
224
+
214
225
-----
215
226
216
227
.. _rate_limiter_section:
@@ -232,7 +243,7 @@ It is important to understand that this product also defines the maximum burst s
232
243
rate limiter is intended to fix (See `issue #61 <https://github.com/pylessard/python-can-isotp/issues/61>`_). Consider the case where a big payload of 10000 bytes must be transmitted,
233
244
after the transmission of the FirstFrame, the receiving party sends a FlowControl message with BlockSize=0 and STMin=0. In that situation, the whole payload can be sent immediately
234
245
but writing 10000 bytes in a single burst might be too much for the CAN driver to handle and may overflow its internal buffer. In
235
-
this situation, it is useful to use the rate limiter to reduces the strain on the driver internal buffer.
246
+
this situation, it is useful to use the rate limiter to reduces the strain on the driver internal buffer.
236
247
237
248
In the above scenario, having a bitrate of 80000 bps and a window size of 0.1 sec would make the :class:`isotp.TransportLayer<isotp.TransportLayer>` output a burst of 8000 bits (1000 bytes) every 0.1 seconds.
raiseValueError('Rate limiter is so restrictive that a SingleFrame cannot be sent. Please, allow a higher bitrate or increase the window size. (tx_data_length = %d)'%self.tx_data_length)
427
428
429
+
ifnotisinstance(self.listen_mode, bool):
430
+
raiseValueError('listen_mode must be a boolean value')
0 commit comments