Skip to content

Comments

feat(logging): support logging of telegrams in hex format#182

Open
sebastian-bantel wants to merge 1 commit intoljean:masterfrom
sebastian-bantel:master
Open

feat(logging): support logging of telegrams in hex format#182
sebastian-bantel wants to merge 1 commit intoljean:masterfrom
sebastian-bantel:master

Conversation

@sebastian-bantel
Copy link

modbus telegrams are often better readable in hex format.

An application can enable hex logging of telegrams by calling the print_telegrams_in_hex function

modbusClient = OpenClient(config)
modbusClient.print_telegrams_in_hex(True)

example log in hex:

DEBUG:modbus_tk:-> 00-01-00-00-00-06-01-04-fa-01-00-1b
DEBUG:modbus_tk:<- 00-01-00-00-00-39-01-04-36-00-2a-37-4b-4d-33-32-32-30-2d-31-42-41-30-31-2d-31-4a-41-30-20-20-4c-51-4e-2f-32-32-30-35-33-31-38-38-30-30-30-38-00-01-44-03-03-00-00-00-f6-00-00-00-01-01-00-1e

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant