Save
Saving
  • 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

    Is there any one response me. I need help.

    Thank you!!!

    posted in BACnet4J general discussion read more
  • C cenk

    Thank you for your example.

    But I think We have to send BUFFER_READY notification to make ready. How can I send it.

    After We have to wait the BUFFER_PRUGED notification to reset buffer. Is it ok?

    Thank you for your help!

    posted in BACnet4J general discussion read more
  • C cenk

    Trend log object is working in bacnet4j, isn't it. Have you ever anyone test it before.

    I need help about trend log.

    posted in BACnet4J general discussion read more
  • C cenk

    So sorry I can not understand that "subclass of the BACnetObject class".

    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