How to receive the COV messeges in BACnet4j.jar
-
Hallo everyone, I'd like to know, if I have subscribed to receive the COV messeges in a right way. Here is my code:
void getCOV(LocalDevice localDevice)throws Exception {
System.out.println("COV"); System.out.println("==============================="); /*byte RemoteIP[]={(byte)192, (byte)168, (byte)178, (byte)101}; Address addr = new Address(RemoteIP, 47808); RemoteDevice d = new RemoteDevice(1010194, addr, null);*/ InetSocketAddress addr = new InetSocketAddress(getByName("192.168.178.101"), 47808); com.serotonin.bacnet4j.type.primitive.Boolean B = new com.serotonin.bacnet4j.type.primitive.Boolean(true); ObjectIdentifier objekt = new ObjectIdentifier(ObjectType.analogOutput,1); SubscribeCOVRequest covReqq = new SubscribeCOVRequest(new UnsignedInteger(0), objekt,B, new UnsignedInteger(0)); localDevice.send(addr, null, 1476, Segmentation.segmentedBoth, covReqq);
I start the code, and if I change the values of present value parameter on the BACnet Device I get the following in the Wire Shark:
36 15.896980000 192.168.178.101 192.168.178.35 BACnet-APDU 84 Confirmed-REQ confirmedCOVNotification[249] device,1010194 analog-output,1 present-value status-flags
37 15.902518000 192.168.178.35 192.168.178.101 BACnet-APDU 51 Simple-ACK confirmedCOVNotification[249]I come to a conclusion that my BACnet Device sends the messages. Am I right? If it is so then how do I get (return) this messeges from BACnet4j.jar?
Thank You in advance!