steveohara / j2mod

Enhanced Modbus library implemented in the Java programming language
Apache License 2.0
267 stars 111 forks source link

Specify IP address in ModbusSlaveFactory #46

Closed MindaugasVarkalys closed 7 years ago

MindaugasVarkalys commented 7 years ago

I created some functions for ModbusSlaveFactory to be able to specify IP address for ModbusSlave.

steveohara commented 7 years ago

Looks good, my only comment is that you are using the getDefaultAddress() as a parameter for a serial ModbusSlave. Doesn't cause any problems but should really pass null so it's clear to everyone that is has no use in this instance.

steveohara commented 7 years ago

Thanks MindVark - you can try your changes out in this snapshot; https://oss.sonatype.org/content/repositories/snapshots/com/ghgande/j2mod/2.3.3-SNAPSHOT/j2mod-2.3.3-20170128.144042-1.jar