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.
Issue with the PriorityArray and multiple BACnet objects of the same type
-
I have recently discovered that if you were to create two objects of the same type which have a priority array (e.g. BV), if you set the Priority at index 3 in BV1, it will also set it in BV2. This happens because in ObjectProperties.java, the static add() function creates a new PriorityArray instance which is then passed into all objects of the same type when they are created. This means the same PriorityArray object is used and passed into all BV instances when they are created.
The solution to this is to after creating your BACnet object (AO, AV, BO, BV etc), call the setProperty() function, and create a new PriorityArray instance;
I.E
BACnetObject bv1 = new BACnetObject(.....);
bv1.setProperty(PropertyIdentifier.priorityArray, new PriorityArray());