这是indexloc提供的服务,不要输入任何密码
Skip to content
This repository was archived by the owner on May 17, 2021. It is now read-only.

Conversation

@ssalonen
Copy link
Contributor

@ssalonen ssalonen commented Sep 7, 2016

Resolves #4595

The default connection timeout is zero which is basically matches the previous behavior (OS default or infinite).

Pre-compiled JAR available at https://github.com/ssalonen/openhab/releases/tag/modbus-timeout-pr-2016-09-07

TODO (once merged): wiki page update

@ssalonen
Copy link
Contributor Author

ssalonen commented Sep 7, 2016

@botura please test the version linked here, and share your experiences. The default timeout is OS default ("infinite"). The configuration was documented in the issue.

@botura
Copy link

botura commented Sep 9, 2016

@ssalonen, it worked as expected.
Without timeout parameter, timeout depends on the OS (that´s good for legacy application).
And with new parameter, timeout occurs according to the parameter value. Great for systems with more than one slave.

I´ll make new tests during the weekend, but I believe everything is ok!

@watou watou added this to the 1.9.0 milestone Sep 14, 2016
return m_ConnectTimeoutMillis;
}

public void setConnectTimeoutMillis(int m_ConnectTimeoutMillis) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the m_ prefix for the method parameter make sense? (obv. very minor point)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that it does not really make sense but I'm keeping the "jamod" (net.wimpi.modbus) code base consistent.

For whatever reason they (=original authors of jamod) are prefixing the private variables with m_.

Perhaps at some point we should consider formatting the whole net.wimpi.modbus code to comform to modern java style guide.

@watou
Copy link
Contributor

watou commented Sep 14, 2016

@ssalonen @botura please report when you are confident that this PR is ready to merge, thanks!

@ssalonen
Copy link
Contributor Author

I'm good with the merge if @botura is happy.

@botura
Copy link

botura commented Sep 16, 2016

Pretty happy @ssalonen. With this enhancement I can definitely use OH in my system.

@watou watou merged commit db62be7 into openhab:master Sep 16, 2016
@ssalonen
Copy link
Contributor Author

Wiki updated.

cdjackson added a commit to cdjackson/openhab1-addons that referenced this pull request Oct 9, 2016
* master: (30 commits)
  [satel] Fixed refresh after control command (openhab#4674)
  [IPX800] Add binding to OH2 distro (openhab#4684)
  Database update (openhab#4692)
  ZWave database update (openhab#4679)
  [xbmc] Minor formatting (openhab#4683)
  some changes to XBMC binding (openhab#4622)
  [telegram] sendTelegramPhoto caption should be UTF-8 (openhab#4650)
  New api url for forecastio provider (openhab#4677)
  Review 1: Patch for: Error on startup with SQLite openhab#4652 (openhab#4670)
  [Plugwise] Fix Circles not always calibrated (openhab#4669)
  Database update (openhab#4664)
  [garadget] Remove misleading text on exception logs (openhab#4663)
  Fixes openhab#4635 (openhab#4649)
  [Plugwise] NullPointerException may occur when concurrent threads get PlugwiseDevice from Stick (openhab#4648)
  insteonplm binding: added mini remote 2342-222 (openhab#4641)
  [modbus] Connection timeout parameter for TCP slaves. (openhab#4627)
  [Plugwise] Add openHAB 2 feature addon (openhab#4644)
  fixes build problems
  [Plugwise] Add support for Scan, Sense, Stealth and Switch openhab#4565 (openhab#4586)
  [satel] Added rule action to set user code (openhab#4634)
  ...
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants