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

Error when writing MultistateObject property stateText


  • When I try to write property stateText on MultistateValue object (assuming same for MultistateInput and Output), I get the following error:

    java.lang.ClassCastException: com.serotonin.bacnet4j.type.constructed.SequenceOf cannot be cast to com.serotonin.bacnet4j.type.constructed.BACnetArray
            at com.serotonin.bacnet4j.obj.mixin.MultistateMixin.validateProperty(MultistateMixin.java:63)
            at com.serotonin.bacnet4j.obj.BACnetObject.writeProperty(BACnetObject.java:481)
            at com.serotonin.bacnet4j.service.confirmed.WritePropertyRequest.handle(WritePropertyRequest.java:102)
            at com.serotonin.bacnet4j.transport.DefaultTransport.handleConfirmedRequest(DefaultTransport.java:870)
            at com.serotonin.bacnet4j.transport.DefaultTransport.incomingConfirmedRequest(DefaultTransport.java:827)
            at com.serotonin.bacnet4j.transport.DefaultTransport.receiveAPDU(DefaultTransport.java:640)
            at com.serotonin.bacnet4j.transport.DefaultTransport.receiveImpl(DefaultTransport.java:578)
            at com.serotonin.bacnet4j.transport.DefaultTransport.run(DefaultTransport.java:498)
            at java.lang.Thread.run(Thread.java:748)
    

    IMO there is inconsistency. Multistate object constructor uses BacnetArray<CharacterString>, write property handler uses SequenceOf<CharacterString>, however, both objects are passed to the same mixin validation procedure.