Closed mxinden closed 5 years ago
Lgtm
Sent by mobile; please excuse my brevity.
On Thu, Jun 27, 2019, 17:34 Max Inden notifications@github.com wrote:
Instead of specifying modbus functions by string e.g. "read holding registers" or "analog output", have the metric address prefixed by the function id e.g."3".
'1xxxx' for read coil / digital output, '2xxxx' for read discrete inputs / digital input, '3xxxx' read holding registers / analog output, '4xxxx' read input registers / analog input.
You can view, comment on, or merge this pull request online at:
https://github.com/mxinden/modbus_exporter/pull/22 Commit Summary
- config&modbus: Specify modbus function by number not string
File Changes
- M config/config.go https://github.com/mxinden/modbus_exporter/pull/22/files#diff-0 (76)
- M config/config_test.go https://github.com/mxinden/modbus_exporter/pull/22/files#diff-1 (2)
- M modbus.yml https://github.com/mxinden/modbus_exporter/pull/22/files#diff-2 (17)
- M modbus/modbus.go https://github.com/mxinden/modbus_exporter/pull/22/files#diff-3 (67)
- M modbus/modbus_test.go https://github.com/mxinden/modbus_exporter/pull/22/files#diff-4 (100)
- M tests/fake_server/main.go https://github.com/mxinden/modbus_exporter/pull/22/files#diff-5 (3)
Patch Links:
- https://github.com/mxinden/modbus_exporter/pull/22.patch
- https://github.com/mxinden/modbus_exporter/pull/22.diff
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mxinden/modbus_exporter/pull/22?email_source=notifications&email_token=AAFYIIZUYLF6JBRHCXKDA4LP4TMXJA5CNFSM4H35IM52YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4G4DO3MQ, or mute the thread https://github.com/notifications/unsubscribe-auth/AAFYII3EQVMSJZCVVM7T6CTP4TMXJANCNFSM4H35IM5Q .
Instead of specifying modbus functions by string e.g. "read holding registers" or "analog output", have the metric address prefixed by the function id e.g."3".
'1xxxx' for read coil / digital output, '2xxxx' for read discrete inputs / digital input, '3xxxx' read holding registers / analog output, '4xxxx' read input registers / analog input.