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

  • According to the standard, BACnetLogData is a choice of log-status, log-data or time-change.

    However, looking at com.serotonin.bacnet4j.type.constructed.LogData.java:```
    public LogData(ByteQueue queue) throws BACnetException {
    logStatus = read(queue, LogStatus.class, 0);
    logData = readSequenceOfChoice(queue, classes, 1);
    timeChange = read(queue, Real.class, 2);
    }

    @Override
    public void write(ByteQueue queue) {
        write(queue, logStatus, 0);
        write(queue, logData, 1);
        write(queue, timeChange, 2);
    }
    
    
    By changing
    
    public LogData(ByteQueue queue) throws BACnetException {
        logStatus = read(queue, LogStatus.class, 0);
        logData = readSequenceOfChoice(queue, classes, 1);
        timeChange = read(queue, Real.class, 2);
    }
    
    public LogData(ByteQueue queue) throws BACnetException {
        int tag = peekTagNumber(queue);
        if (tag == 0)
        {
            logStatus = read(queue, LogStatus.class, 0);
            logData = null;
            timeChange = null;
        }
        else if (tag == 1)
        {
            logStatus = null;
            logData = readSequenceOfChoice(queue, classes, 1);
            timeChange = null;
        }
        else if (tag == 2)
        {
            logStatus = null;
            logData = null;
            timeChange = read(queue, Real.class, 2);
        }
        else
        {
            throw new BACnetErrorException(ErrorClass.property, ErrorCode.missingRequiredParameter);
        }
    }