Skip to content

Commit 685f3cb

Browse files
committed
Add **kwargs for receive
1 parent 11b9089 commit 685f3cb

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

minicps/devices.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ def send(self, what, value, address):
242242
else:
243243
return self._protocol._send(what, value, address)
244244

245-
def recieve(self, what, address):
245+
def recieve(self, what, address, **kwargs):
246246
"""Receive (read) a value from another network host.
247247
248248
:param tuple what: field[s] identifier[s]

minicps/protocols.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ def _send(self, what, value, address):
9595

9696
print '_send: please override me.'
9797

98-
def _receive(self, what, address):
98+
def _receive(self, what, address, **kwargs):
9999
"""Receive (read) a value from another host.
100100
101101
:address: to receive from
@@ -380,7 +380,7 @@ def _send(self, what, value, address='localhost:44818'):
380380
except Exception as error:
381381
print 'ERROR enip _send: ', error
382382

383-
def _receive(self, what, address='localhost:44818'):
383+
def _receive(self, what, address='localhost:44818', **kwargs):
384384
"""Receive (read) a value from another host.
385385
386386
It is a blocking operation the parent process will wait till the child
@@ -607,7 +607,6 @@ def _stop_server(cls, server):
607607
print 'ERROR stop modbus server: ', error
608608

609609

610-
# TODO: implement it
611610
def _send(self, what, value, address='localhost:502'):
612611
"""Send (write) a value to another host.
613612

0 commit comments

Comments
 (0)