itm / wsn-device-utils

A set of command line utils to reprogram, reset, listen to, ... wireless sensor network devices
2 stars 5 forks source link

DeviceObserver: calculate events for each listener individually based on his last state #37

Closed danbim closed 12 years ago

danbim commented 12 years ago

Given that there is more than one listener that registers later in time than the first he might not get a full diff to his own state (which is e.g. null). Therefore store the last state of all individual listeners and calculate the changes based on this information rather than storing one last state for all of the listeners.

This is analogue to the same problem solved in the DOMObserver class of itm-utils. See https://github.com/itm/itm-utils/issues/27 for the implementation.