@@ -21,14 +21,14 @@ class ReadBitsRequestBase(ModbusRequest):
2121
2222 _rtu_frame_size = 8
2323
24- def __init__ (self , address , count , slave = 0 , ** kwargs ):
24+ def __init__ (self , address , count , slave = 0 , transaction = 0 , protocol = 0 , skip_encode = False , ** _kwargs ):
2525 """Initialize the read request data.
2626
2727 :param address: The start address to read from
2828 :param count: The number of bits after "address" to read
2929 :param slave: Modbus slave slave ID
3030 """
31- ModbusRequest .__init__ (self , slave , ** kwargs )
31+ ModbusRequest .__init__ (self , slave , transaction , protocol , skip_encode )
3232 self .address = address
3333 self .count = count
3434
@@ -75,13 +75,13 @@ class ReadBitsResponseBase(ModbusResponse):
7575
7676 _rtu_byte_count_pos = 2
7777
78- def __init__ (self , values , slave = 0 , ** kwargs ):
78+ def __init__ (self , values , slave = 0 , transaction = 0 , protocol = 0 , skip_encode = False , ** _kwargs ):
7979 """Initialize a new instance.
8080
8181 :param values: The requested values to be returned
8282 :param slave: Modbus slave slave ID
8383 """
84- ModbusResponse .__init__ (self , slave , ** kwargs )
84+ ModbusResponse .__init__ (self , slave , transaction , protocol , skip_encode )
8585
8686 #: A list of booleans representing bit values
8787 self .bits = values or []
@@ -146,14 +146,14 @@ class ReadCoilsRequest(ReadBitsRequestBase):
146146 function_code = 1
147147 function_code_name = "read_coils"
148148
149- def __init__ (self , address = None , count = None , slave = 0 , ** kwargs ):
149+ def __init__ (self , address = None , count = None , slave = 0 , transaction = 0 , protocol = 0 , skip_encode = False , ** _kwargs ):
150150 """Initialize a new instance.
151151
152152 :param address: The address to start reading from
153153 :param count: The number of bits to read
154154 :param slave: Modbus slave slave ID
155155 """
156- ReadBitsRequestBase .__init__ (self , address , count , slave , ** kwargs )
156+ ReadBitsRequestBase .__init__ (self , address , count , slave , transaction , protocol , skip_encode )
157157
158158 async def execute (self , context ):
159159 """Run a read coils request against a datastore.
@@ -193,13 +193,13 @@ class ReadCoilsResponse(ReadBitsResponseBase):
193193
194194 function_code = 1
195195
196- def __init__ (self , values = None , slave = 0 , ** kwargs ):
196+ def __init__ (self , values = None , slave = 0 , transaction = 0 , protocol = 0 , skip_encode = False , ** _kwargs ):
197197 """Initialize a new instance.
198198
199199 :param values: The request values to respond with
200200 :param slave: Modbus slave slave ID
201201 """
202- ReadBitsResponseBase .__init__ (self , values , slave , ** kwargs )
202+ ReadBitsResponseBase .__init__ (self , values , slave , transaction , protocol , skip_encode )
203203
204204
205205class ReadDiscreteInputsRequest (ReadBitsRequestBase ):
@@ -214,14 +214,14 @@ class ReadDiscreteInputsRequest(ReadBitsRequestBase):
214214 function_code = 2
215215 function_code_name = "read_discrete_input"
216216
217- def __init__ (self , address = None , count = None , slave = 0 , ** kwargs ):
217+ def __init__ (self , address = None , count = None , slave = 0 , transaction = 0 , protocol = 0 , skip_encode = False , ** _kwargs ):
218218 """Initialize a new instance.
219219
220220 :param address: The address to start reading from
221221 :param count: The number of bits to read
222222 :param slave: Modbus slave slave ID
223223 """
224- ReadBitsRequestBase .__init__ (self , address , count , slave , ** kwargs )
224+ ReadBitsRequestBase .__init__ (self , address , count , slave , transaction , protocol , skip_encode )
225225
226226 async def execute (self , context ):
227227 """Run a read discrete input request against a datastore.
@@ -261,10 +261,10 @@ class ReadDiscreteInputsResponse(ReadBitsResponseBase):
261261
262262 function_code = 2
263263
264- def __init__ (self , values = None , slave = 0 , ** kwargs ):
264+ def __init__ (self , values = None , slave = 0 , transaction = 0 , protocol = 0 , skip_encode = False , ** _kwargs ):
265265 """Initialize a new instance.
266266
267267 :param values: The request values to respond with
268268 :param slave: Modbus slave slave ID
269269 """
270- ReadBitsResponseBase .__init__ (self , values , slave , ** kwargs )
270+ ReadBitsResponseBase .__init__ (self , values , slave , transaction , protocol , skip_encode )
0 commit comments