Skip to content

Commit 46e3929

Browse files
committed
add more logging
1 parent b5dfbf7 commit 46e3929

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

umodbus/asynchronous/modbus.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ async def _process_read_access(self,
5959
"""@see Modbus._process_read_access"""
6060

6161
task = super()._process_read_access(request, reg_type)
62+
print("async process_read_access task = ", task)
6263
if task is not None:
6364
await task
6465

@@ -68,5 +69,6 @@ async def _process_write_access(self,
6869
"""@see Modbus._process_write_access"""
6970

7071
task = super()._process_write_access(request, reg_type)
72+
print("async process_write_access task = ", task)
7173
if task is not None:
7274
await task

umodbus/common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def send_response(self,
8080
:param signed: Indicates if signed values are used
8181
:type signed: bool
8282
"""
83-
print("sending sync response...")
83+
print("sending sync response...", type(self).__name__, "->", type(self._itf).__name__)
8484
self._itf.send_response(self.unit_addr,
8585
self.function,
8686
self.register_addr,

umodbus/modbus.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ def _process_read_access(self, request: Request, reg_type: str) \
204204
_cb = self._register_dict[reg_type][address]['on_get_cb']
205205
_cb(reg_type=reg_type, address=address, val=vals)
206206

207-
print("creating response...")
207+
print("creating response...", type(self).__name__, "->", type(request).__name__)
208208
vals = self._create_response(request=request, reg_type=reg_type)
209209
return request.send_response(vals)
210210
else:

0 commit comments

Comments
 (0)