-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Update modbus.go #9916
Update modbus.go #9916
Conversation
More slave_id repair the same serial port name problem
Thanks so much for the pull request! |
!signed-cla |
Thanks so much for the pull request! |
!signed-cla |
@meimz what are you trying to fix with this PR? |
There already is PR #9279 which adds this feature. Is this what you are looking for? |
Yes,That is right!But PR #9279 is not solve different configuration node use the same contorller . `[[inputs.modbus]] [[inputs.modbus]] |
`[[inputs.modbus]] [[inputs.modbus]] 3.Do not modify the configuration file above and this PR can run. |
@meimz I understand your point, but I think we should not support this. With your PR you add a state to the plugin which in turn adds complexity such as caches etc. Imaging one plugin now disconnects or sets different parameters for the same interface (e.g. different timeout, baud rate, transmission mode)... Right now (and I also think with #9279) the program flow is easy to follow and robust which will change with this PR. |
More slave_id repair the same serial port name problem
--- PASS: TestRetrySuccessful (0.00s)
=== RUN TestRetryFailExhausted
2021/10/13 17:24:46 D! [] trying to read coil@0[1]...
2021/10/13 17:24:46 I! [] Device busy! Retrying 2 more time(s)...
2021/10/13 17:24:46 D! [] trying to read coil@0[1]...
2021/10/13 17:24:46 I! [] Device busy! Retrying 1 more time(s)...
2021/10/13 17:24:46 D! [] trying to read coil@0[1]...
--- PASS: TestRetryFailExhausted (0.00s)
=== RUN TestRetryFailIllegal
2021/10/13 17:24:46 D! [] trying to read coil@0[1]...
--- PASS: TestRetryFailIllegal (0.00s)
PASS
ok github.com/influxdata/telegraf/plugins/inputs/modbus 0.647s
Required for all PRs:
resolves #