Skip to content

Commit 2735d4d

Browse files
committed
Add getResponseSize() for WriteMultipleRegistersRequest
1 parent c5a9eae commit 2735d4d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

pymodbus/register_write_message.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,13 @@ def execute(self, context):
186186
context.setValues(self.function_code, self.address, self.values)
187187
return WriteMultipleRegistersResponse(self.address, self.count)
188188

189+
def getResponseSize(self):
190+
''' Returns expected packet size of response for this request
191+
192+
:returns: The expected packet size
193+
'''
194+
return 2 + 2
195+
189196
def __str__(self):
190197
''' Returns a string representation of the instance
191198

0 commit comments

Comments
 (0)