Skip to content

Commit f074f65

Browse files
authored
Add get_response_pdu_size to mask read/write. (#922)
1 parent 6b3dbc3 commit f074f65

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

pymodbus/register_write_message.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,14 @@ def decode(self, data):
109109
"""
110110
self.address, self.value = struct.unpack(">HH", data)
111111

112+
def get_response_pdu_size(self): # pylint: disable=no-self-use
113+
"""Get response pdu size.
114+
115+
Func_code (1 byte) + Starting Address (2 byte) + And_mask (2 Bytes) + OrMask (2 Bytes)
116+
:return:
117+
"""
118+
return 1 + 2 + 2 + 2
119+
112120
def __str__(self):
113121
"""Return a string representation of the instance.
114122

0 commit comments

Comments
 (0)