• C
    cenk

    Hi,

    I increased time out

    ld.withAPDUTimeout(new UnsignedInteger(30000));
    

    But result is same.

    We are not using remotedevice cach of local device. Remotedevice is a variable in our class.

    posted in BACnet4J general discussion read more
  • C
    cenk

    We are reading present value each 1 second periodically in the thread.

    refs3 = new PropertyReferences();
    refs3.add(oid, PropertyIdentifier.presentValue);
    
    PropertyValues pvs3 = RequestUtils.readProperties(ld, rd, refs3, null);
    

    Sometimes Bacnettimeoutexception error occurred.

    com.serotonin.bacnet4j.exception.BACnetTimeoutException
    at com.serotonin.bacnet4j.transport.ServiceFutureImpl.result(ServiceFutureImpl.java:74)
    	at com.serotonin.bacnet4j.transport.ServiceFutureImpl.get(ServiceFutureImpl.java:63)
    	at com.serotonin.bacnet4j.util.RequestUtils.readProperties(RequestUtils.java:313)
    

    When LocalDevice terminated and initial again error looking up

    ld.terminate();
    try {
    	ld.initialize();
    } catch (Exception e) {
        e.printStackTrace();
    }
    

    What is the problem. How can I find a solution?

    Thank you

    posted in BACnet4J general discussion read more
  • C
    cenk

    Hi,

    How can I check RemoteDevice gone to down.(connection broken)

    posted in BACnet4J general discussion read more
  • C
    cenk

    Hi,

    I defined a trend log object in bacnet slave application this like

    
            BACnetObject ai0 = new BACnetObject(localDevice, localDevice.getNextInstanceObjectIdentifier(ObjectType.trendLog));
    
            ai0.setProperty(PropertyIdentifier.enable, new Boolean(true));
            ai0.setProperty(PropertyIdentifier.stopWhenFull, new Boolean(true));
            ai0.setProperty(PropertyIdentifier.bufferSize, new UnsignedInteger(20));
            ai0.setProperty(PropertyIdentifier.recordCount, new UnsignedInteger(0));
            ai0.setProperty(PropertyIdentifier.totalRecordCount, new UnsignedInteger(0));
            ai0.setProperty(PropertyIdentifier.notificationThreshold, new UnsignedInteger(4));
            ai0.setProperty(PropertyIdentifier.loggingType, LoggingType.polled);
    
    

    And I added value to ai0 object this like

    
    
                SequenceOf<LogRecord> lrs = (SequenceOf<LogRecord>) ai0.getProperty(PropertyIdentifier.logBuffer);
                count++;
                ai0.setProperty(PropertyIdentifier.recordCount, new UnsignedInteger(count));
                ai0.setProperty(PropertyIdentifier.totalRecordCount, new UnsignedInteger(count));
                
                
                LogRecord lr = new LogRecord(new DateTime(System.currentTimeMillis()), true, new Real(ai0value), new StatusFlags(false, false, false, false));
                lrs.add(lr);
    
    

    I think, when record count value is reach the notificationThreshold value(in example this value is setted 4) Buffer_Ready notification event can be sent. Buffer_Ready notification event will be either automaticly sent by bacnet4j or manually in program. How can I send Buffer_Ready event notification

    posted in BACnet4J general discussion read more
  • C
    cenk

    Hi,

    We are developing a slavedevice and we want to log some value.How can I define the values as trend log. Is there any example for trend log for slavedevice.

    Thank you!

    posted in BACnet4J general discussion read more
  • C
    cenk

    Hi;

    I am trying Bacnet4j on linux. But when I created bacnet device The error occured. Message is below

    java.lang.RuntimeException: java.net.SocketException: getifaddrs not supported
    at com.serotonin.bacnet4j.LocalDevice.getAllLocalAddresses(LocalDevice.java:779)
    at com.serotonin.bacnet4j.service.unconfirmed.IAmRequest.handle(IAmRequest.java:71)
    at com.serotonin.bacnet4j.LocalDevice.handleUnconfirmedRequest(LocalDevice.java:733)
    at com.serotonin.bacnet4j.npdu.ip.IpMessageControl$IncomingMessageExecutor.runImpl(IpMessageControl.java:555)
    at com.serotonin.bacnet4j.npdu.ip.IpMessageControl$IncomingMessageExecutor.run(IpMessageControl.java:489)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    Caused by: java.net.SocketException: getifaddrs not supported
    at java.net.VMNetworkInterface.getVMInterfaces(Native Method)
    at java.net.NetworkInterface.getNetworkInterfaces(Unknown Source)
    at com.serotonin.bacnet4j.LocalDevice.getAllLocalAddresses(LocalDevice.java:768)
    ...7 more

    It seem the Operating system is not supported getifaddrs. But how can I do.

    Thank you!

    posted in BACnet4J general discussion read more
  • C
    cenk

    When I define a device as

    
    LocalDevice localDevice = new LocalDevice(1972, "10.10.0.11");
    

    the localdevice will broadcast to only 10.10.0.11.

    How can define multi ip address to broadcast to all of them.

    Maybe The broadcast IP can be changed 10.1.0.255. But I think it is not goog solition.

    I want to broadcast to only 5 ip (10.10.0.11, 10.10.0.12,10.10.0.13,...)

    How can I make it

    posted in BACnet4J general discussion read more
  • C
    cenk

    Hi;

    I have created Bacnet device. And I can added max 292 objects(Analog input). When I created 293 obects , error occured("Invalid packed.Unknown reject reason) on bacnet server.

    And on java error message is below

    
    java.lang.NullPointerException
    	at com.serotonin.bacnet4j.event.DefaultExceptionListener.receivedThrowable(DefaultExceptionListener.java:37)
    	at com.serotonin.bacnet4j.npdu.ip.IpMessageControl$IncomingMessageExecutor.runImpl(IpMessageControl.java:530)
    	at com.serotonin.bacnet4j.npdu.ip.IpMessageControl$IncomingMessageExecutor.run(IpMessageControl.java:470)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    	at java.lang.Thread.run(Unknown Source)
    

    What is the problem. Can I created max 292 objects? But I need more than 292 objects. What can I do.

    posted in BACnet4J general discussion read more
  • C
    cenk

    Hi;

    I have created Bacnet device. And I can added max 292 objects(Analog input). When I created 293 obects , error occured("Invalid packed.Unknown reject reason). What is the problem. Can I created max 292 objects? But I need more than 292 objects. What can I do.

    posted in BACnet4J general discussion read more
  • C
    cenk

    I am developing bacnet client application. But sometimes the exception throw

    
    java.lang.NullPointerException
    	at com.serotonin.bacnet4j.type.Encodable.writeEncodable(Encodable.java:270)
    	at com.serotonin.bacnet4j.service.acknowledgement.ReadPropertyAck.write(ReadPropertyAck.java:79)
    	at com.serotonin.bacnet4j.npdu.ip.IpMessageControl.sendResponse(IpMessageControl.java:239)
    	at com.serotonin.bacnet4j.npdu.ip.IpMessageControl.access$300(IpMessageControl.java:74)
    	at com.serotonin.bacnet4j.npdu.ip.IpMessageControl$IncomingMessageExecutor.runImpl(IpMessageControl.java:538)
    	at com.serotonin.bacnet4j.npdu.ip.IpMessageControl$IncomingMessageExecutor.run(IpMessageControl.java:456)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    	at java.lang.Thread.run(Unknown Source)
    
    

    But client is working. What is the message mean? How can ? correct it?

    posted in BACnet4J general discussion read more