Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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