@@ -232,9 +232,13 @@ class IsoTPSocketConnection(BaseConnection):
232
232
:type name: string
233
233
:param tpsock: An optional ISO-TP socket to use instead of creating one.
234
234
:type tpsock: isotp.socket
235
+ :param args: Optional parameters list passed to ISO-TP socket binding method.
236
+ :type args: list
237
+ :param kwargs: Optional parameters dictionary passed to ISO-TP socket binding method.
238
+ :type kwargs: dict
235
239
236
240
"""
237
- def __init__ (self , interface , rxid , txid , name = None , tpsock = None ):
241
+ def __init__ (self , interface , rxid , txid , name = None , tpsock = None , * args , ** kwargs ):
238
242
239
243
BaseConnection .__init__ (self , name )
240
244
@@ -244,6 +248,8 @@ def __init__(self, interface, rxid, txid, name=None, tpsock=None):
244
248
self .rxqueue = queue .Queue ()
245
249
self .exit_requested = False
246
250
self .opened = False
251
+ self .tpsock_bind_args = args
252
+ self .tpsock_bind_kwargs = kwargs
247
253
248
254
if tpsock is None :
249
255
if 'isotp' not in sys .modules :
@@ -257,7 +263,7 @@ def __init__(self, interface, rxid, txid, name=None, tpsock=None):
257
263
258
264
259
265
def open (self ):
260
- self .tpsock .bind (self .interface , rxid = self .rxid , txid = self .txid )
266
+ self .tpsock .bind (self .interface , rxid = self .rxid , txid = self .txid , * self . tpsock_bind_args , ** self . tpsock_bind_kwargs )
261
267
self .exit_requested = False
262
268
self .rxthread = threading .Thread (target = self .rxthread_task )
263
269
self .rxthread .start ()
0 commit comments