openhab/openhab — pull request #1050 by cdjackson (2014-05-05 11:08:01+00:00)
Title: Zwave polling

This changes the polling system in the zwave binding. Previously, every 'execute' period, the whole item list would be iterated through to look for items needing polling. Firstly this is quite wasteful of resources since polling shouldn't be enabled for many nodes.

However, the main issue is it potentially meant if polling was enabled on many nodes, we could flood the queue with poll requests. This could slow down the binding for 'real' traffic (ie turning your lights on/off).

This change now creates a polling table. The table is created on startup and when bindings change. We then cycle through this list looking for items to poll. It only allows 2 messages into the queue at a time, and on the next poll the list starts where it left off so all items get their chance to be updated without filling the queue with poll updates.