• C
    carnecro

    Is there any example of how to define and use proprietary object properties?

    posted in BACnet4J general discussion read more
  • C
    carnecro

    Asking for COV Subscriptions ended in NPE:

    [BACnet4J transport] ERROR com.serotonin.bacnet4j.transport.DefaultTransport - Error during receive: NPDU [from=Address [networkNumber=0, macAddress=[c0,a8,0,83,ba,c0]], linkService=null, queue=[]]
    java.lang.NullPointerException
    	at com.serotonin.bacnet4j.type.Encodable.write(Encodable.java:234)
    	at com.serotonin.bacnet4j.type.constructed.ObjectPropertyReference.write(ObjectPropertyReference.java:58)
    	at com.serotonin.bacnet4j.type.constructed.BaseType.write(BaseType.java:41)
    	at com.serotonin.bacnet4j.type.Encodable.write(Encodable.java:234)
    	at com.serotonin.bacnet4j.type.constructed.CovSubscription.write(CovSubscription.java:57)
    	at com.serotonin.bacnet4j.type.constructed.SequenceOf.write(SequenceOf.java:62)
    	at com.serotonin.bacnet4j.type.constructed.BaseType.write(BaseType.java:41)
    	at com.serotonin.bacnet4j.type.Encodable.writeEncodable(Encodable.java:323)
    	at com.serotonin.bacnet4j.service.acknowledgement.ReadPropertyAck.write(ReadPropertyAck.java:88)
    	at com.serotonin.bacnet4j.transport.DefaultTransport.sendConfirmedResponse(DefaultTransport.java:752)
    	at com.serotonin.bacnet4j.transport.DefaultTransport.incomingConfirmedRequest(DefaultTransport.java:704)
    	at com.serotonin.bacnet4j.transport.DefaultTransport.receiveAPDU(DefaultTransport.java:531)
    	at com.serotonin.bacnet4j.transport.DefaultTransport.receiveImpl(DefaultTransport.java:463)
    	at com.serotonin.bacnet4j.transport.DefaultTransport.run(DefaultTransport.java:404)
    	at java.lang.Thread.run(Thread.java:745)
    ```

    posted in BACnet4J general discussion read more
  • C
    carnecro

    The method

    covNotificationReceived(...)
    

    in

    com.serotonin.bacnet4j.event.DeviceEventLiistener
    

    is fired on the client side when a BACnet client receives a value change from a BACnet server. What I need is the opposite - I need an event on the server side when a client starts to poll for a BACnetObject property (in my case the PresentValue). The proper place for a hook could be

    BACnetObject.addCovSubscription()
    BACnetObject.removeCovSubscription()
    

    or

    CovReportingMixin.addCovSubscription()
    CovReportingMixin.removeCovSubscription()
    

    Both are not easy to implement via subclassing (Bacnet4J library does not allow me to add my own MixIn, for example) so I ended by changing the original source code.

    posted in BACnet4J general discussion read more
  • C
    carnecro

    I am writing a gateway between a proprietary protocol and BACnet, where a large number of data points should be exposed as BACnet points. I need to know when any BACnet client subscribed an object for data delivery to start polling for values on the backend. Any idea where to hook?

    posted in BACnet4J general discussion read more
  • C
    carnecro

    I started to play a bit with the Bacnet4J code and I have an issue that I cannot resolve. The simple DiscoveryTest from src_test works for me only on Windows OS. Running the same code on MacOSX, Linux (Debian) and even Embedded ARM Linux blocks on UDP receive(). In the wiresharrk I see the WhoIs messages are sent and my Bacnet remote devices are responding the IAm. First I thought I have a local firewall active on the hosts, however, running UdpDump test works fine and brings me the responses on all systems.

    Any idea from community before I start to dive into the code? BTW is the community active? I did not see any answer since last 6 months in this forum?

    posted in BACnet4J general discussion read more