David Staudt | Your basic assumptions are good ones: if you just need a snapshot of the device at a point in time getDeviceState will be highly accurate. If you want to display states dynamically/real-time (event driven) use an observer.
I would say observer/events is 'more robust' in the sense that you can get both static and dynamic functionality that way, but if you just need a snapshot - for example an instantaneous decision to send a call to a device based on whether it is busy or not - then observer/events (and the state machine, threading and handling overhead) may be 'overkill'. |
| Please sign in to flag this as inappropriate. |