Skip to content

Conversation

andig
Copy link
Contributor

@andig andig commented Oct 9, 2018

Intention of this PR is to remove the need for ducktyping like this:

if handler, ok := q.handler.(*modbus.RTUClientHandler); ok {
    handler.SlaveId = deviceid
} else if handler, ok := q.handler.(*modbus.TCPClientHandler); ok {
    handler.SlaveId = deviceid
}

Same goes for the Connect and Close methods which are already implemented but not exposed via interface.

Replaces #22

kgritesh pushed a commit to pashi-corp/modbus that referenced this pull request Apr 30, 2021
fix: flush read buffer before writing request
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