I'm working with bacnet via java, the bacnet4j project. I have a device with bacnet objects and I want to monitor this object by second devices (COV). How can i run subscripton?
I should take advantage of
localDevice.getEventHandler().addListener(new DeviceEventListener() {
and use the functions that are there?
Maybe someone put me on the right track. Or is there any example I can analyze?
I haven't tested this with real device (I authored bacnet4j-wrapper for subset of BACnet objects).
The change of value is two step process. First you need to add
DeviceEventListener, just as you did. A more convenient way isDeviceEventAdapterwhich ships all methods - one you need to implement iscovNotificationReceived. Once you have your listener in place you need to fireSubscribeCOVRequestfor specific object you want to watch.Take a look on sources ChangeOfValueTest.java.