Bacnet4j COV subscription

625 views Asked by At

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?

1

There are 1 answers

4
splatch On

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 is DeviceEventAdapter which ships all methods - one you need to implement is covNotificationReceived. Once you have your listener in place you need to fire SubscribeCOVRequest for specific object you want to watch.

Take a look on sources ChangeOfValueTest.java.