-
Notifications
You must be signed in to change notification settings - Fork 951
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#256 Modbus TCP async server fix transactions > 255
- Loading branch information
1 parent
019bdde
commit b77d4a6
Showing
3 changed files
with
30 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -59,7 +59,7 @@ def dataReceived(self, data): | |
if _logger.isEnabledFor(logging.DEBUG): | ||
_logger.debug(' '.join([hex(byte2int(x)) for x in data])) | ||
if not self.factory.control.ListenOnly: | ||
unit_address = byte2int(data[0]) | ||
unit_address = byte2int(data[6]) | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
dhoomakethu
Author
Contributor
|
||
if unit_address in self.factory.store: | ||
self.framer.processIncomingPacket(data, self._execute) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is not the same change as you made in sync.py, and by all appearances you're now just breaking RTU mode to fix TCP mode. Why are you not just leaving this to the framer.processIncomingPacket to decide itself?