• C
    cenk

    Hi,

    So sorry I am not sure understand exactly. To check that everything is ok, I have to remove subscription and subscription again periodically? For example each 1 min
    For removing subscription

    localDevice.send(remoteDevice, new SubscribeCOVRequest(new UnsignedInteger(4),
                    			new ObjectIdentifier(ObjectType.analogValue, 1), null null)).get();
    

    And after subscription again

    localDevice.send(remoteDevice, new SubscribeCOVRequest(new UnsignedInteger(4),
                    			new ObjectIdentifier(ObjectType.analogValue, 1),, Boolean.FALSE, null)).get();
    

    Is it ok?

    Is there any example for this issue

    Thankyou for your help.

    posted in BACnet4J general discussion read more
  • C
    cenk

    Hi
    I defined cov subscribe. I can see change of value in covNotificationReceived method.

    localDevice.send(remoteDevice, new SubscribeCOVRequest(new UnsignedInteger(4),
                    			new ObjectIdentifier(ObjectType.analogValue, 1),, Boolean.FALSE, null)).get();
    
    

    When The application running, remote device can be shutdown or connection broken or Object can be deleted on remote device. How can be checked this situations in the application. How can be realized in the application.

    posted in BACnet4J general discussion read more
  • 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