Skip to content

Commit 47b0cc9

Browse files
authored
Support generator for send (#106)
Support ending data by passing a pair of generator and size
1 parent 54fac74 commit 47b0cc9

5 files changed

Lines changed: 253 additions & 91 deletions

File tree

doc/source/isotp/implementation.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,7 @@ All errors inherit :class:`isotp.IsoTpError<isotp.IsoTpError>` which itself inhe
358358
.. autoclass:: isotp.MissingEscapeSequenceError
359359
.. autoclass:: isotp.InvalidCanFdFirstFrameRXDL
360360
.. autoclass:: isotp.OverflowError
361+
.. autoclass:: isotp.BadGeneratorError
361362

362363
----------
363364

isotp/errors.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ class BlockingSendFailure(IsoTpError):
1010
pass
1111

1212

13+
class BadGeneratorError(IsoTpError):
14+
"""Happens when the user tries to send data using a generator and provides a size that does not match the amount of data in the generator"""
15+
pass
16+
17+
1318
class BlockingSendTimeout(BlockingSendFailure):
1419
"""Happens when a blocking send fails to complete because the user timeout is expired. Inherits :class:`BlockingSendFailure<isotp.BlockingSendFailure>`"""
1520
pass

0 commit comments

Comments
 (0)