Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to support@radixiot.com.

Radix IoT Website Mango 3 Documentation Website Mango 4 Documentation Website

Reading Trendlog LogBuffer property should return an error


  • The BACnet standard states that any attempt to read the LogBuffer property of a Trendlog or Trendlog Multiple object with a ReadProperty-Request or a ReadPropertyMultiple-Request shall cause a a Result(-) response, with an Error class of PROPERTY, and an Error Code of READ_ACCESS_DENIED.
    Currently BACnet4j does not do this.
    I've created a couple of patches which I believe fix this:

    
    diff --git a/src/com/serotonin/bacnet4j/service/confirmed/ReadPropertyMultipleRequest.java b/src/com/serotonin/bacnet4j/service/confirmed/ReadPropertyMultipleRequest.java
    --- a/src/com/serotonin/bacnet4j/service/confirmed/ReadPropertyMultipleRequest.java
    +++ b/src/com/serotonin/bacnet4j/service/confirmed/ReadPropertyMultipleRequest.java
    @@ -44,6 +44,8 @@
     import com.serotonin.bacnet4j.type.constructed.ReadAccessResult.Result;
     import com.serotonin.bacnet4j.type.constructed.ReadAccessSpecification;
     import com.serotonin.bacnet4j.type.constructed.SequenceOf;
    +import com.serotonin.bacnet4j.type.enumerated.ErrorClass;
    +import com.serotonin.bacnet4j.type.enumerated.ErrorCode;
     import com.serotonin.bacnet4j.type.enumerated.PropertyIdentifier;
     import com.serotonin.bacnet4j.type.primitive.ObjectIdentifier;
     import com.serotonin.bacnet4j.type.primitive.OctetString;
    @@ -151,7 +153,10 @@
             else {
                 // Get the specified property.
                 try {
    -                results.add(new Result(pid, pin, obj.getPropertyRequired(pid, pin)));
    +            	if (pid.equals(PropertyIdentifier.logBuffer))
    +            		results.add(new Result(pid, pin, new BACnetError(ErrorClass.property, ErrorCode.readAccessDenied)));
    +            	else
    +            		results.add(new Result(pid, pin, obj.getPropertyRequired(pid, pin)));
                 }
                 catch (BACnetServiceException e) {
                     results.add(new Result(pid, pin, new BACnetError(e.getErrorClass(), e.getErrorCode())));
    
    

    diff --git a/src/com/serotonin/bacnet4j/service/confirmed/ReadPropertyMultipleRequest.java b/src/com/serotonin/bacnet4j/service/confirmed/ReadPropertyMultipleRequest.java
    --- a/src/com/serotonin/bacnet4j/service/confirmed/ReadPropertyMultipleRequest.java
    +++ b/src/com/serotonin/bacnet4j/service/confirmed/ReadPropertyMultipleRequest.java
    @@ -44,6 +44,8 @@
    import com.serotonin.bacnet4j.type.constructed.ReadAccessResult.Result;
    import com.serotonin.bacnet4j.type.constructed.ReadAccessSpecification;
    import com.serotonin.bacnet4j.type.constructed.SequenceOf;
    +import com.serotonin.bacnet4j.type.enumerated.ErrorClass;
    +import com.serotonin.bacnet4j.type.enumerated.ErrorCode;
    import com.serotonin.bacnet4j.type.enumerated.PropertyIdentifier;
    import com.serotonin.bacnet4j.type.primitive.ObjectIdentifier;
    import com.serotonin.bacnet4j.type.primitive.OctetString;
    @@ -151,7 +153,10 @@
    else {
    // Get the specified property.
    try {

    •            results.add(new Result(pid, pin, obj.getPropertyRequired(pid, pin)));
      
    •        	if (pid.equals(PropertyIdentifier.logBuffer))
      
    •        		results.add(new Result(pid, pin, new BACnetError(ErrorClass.property, ErrorCode.readAccessDenied)));
      
    •        	else
      
    •        		results.add(new Result(pid, pin, obj.getPropertyRequired(pid, pin)));
             }
             catch (BACnetServiceException e) {
                 results.add(new Result(pid, pin, new BACnetError(e.getErrorClass(), e.getErrorCode())));