@@ -125,7 +125,7 @@ def populateResult(self, result):
125125 result .transaction_id = self ._header .get ("tid" , 0 )
126126 result .protocol_id = self ._header .get ("pid" , 0 )
127127
128- def processIncomingPacket (self , data : bytes , callback , slave , ** kwargs ):
128+ def processIncomingPacket (self , data : bytes , callback , slave , single = False , tid = None ):
129129 """Process new packet pattern.
130130
131131 This takes in a new request packet, adds it to the current
@@ -141,7 +141,8 @@ def processIncomingPacket(self, data: bytes, callback, slave, **kwargs):
141141 :param callback: The function to send results to
142142 :param slave: Process if slave id matches, ignore otherwise (could be a
143143 list of slave ids (server) or single slave id(client/server))
144- :param kwargs:
144+ :param single: multiple slave ?
145+ :param tid: transaction id
145146 :raises ModbusIOException:
146147 """
147148 Log .debug ("Processing: {}" , data , ":hex" )
@@ -150,11 +151,10 @@ def processIncomingPacket(self, data: bytes, callback, slave, **kwargs):
150151 return
151152 if not isinstance (slave , (list , tuple )):
152153 slave = [slave ]
153- single = kwargs .pop ("single" , False )
154- self .frameProcessIncomingPacket (single , callback , slave , ** kwargs )
154+ self .frameProcessIncomingPacket (single , callback , slave , tid = tid )
155155
156156 def frameProcessIncomingPacket (
157- self , _single , _callback , _slave , _tid = None , ** kwargs
157+ self , _single , _callback , _slave , tid = None
158158 ) -> None :
159159 """Process new packet pattern."""
160160
0 commit comments