Skip to content

Commit

Permalink
Add getResponseSize() for WriteMultipleRegistersRequest
Browse files Browse the repository at this point in the history
  • Loading branch information
Cougar authored and sjlongland committed Oct 21, 2015
1 parent f89c9eb commit e3cbe54
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pymodbus/register_write_message.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,13 @@ def execute(self, context):
context.setValues(self.function_code, self.address, self.values)
return WriteMultipleRegistersResponse(self.address, self.count)

def getResponseSize(self):
''' Returns expected packet size of response for this request
:returns: The expected packet size
'''
return 2 + 2

def __str__(self):
''' Returns a string representation of the instance
Expand Down

0 comments on commit e3cbe54

Please sign in to comment.