public void setCommandable(Encodable value, UnsignedInteger priority) { uint pri = 16; if (priority != null) { pri = priority.Value; } PriorityArray priorityArray = (PriorityArray)getProperty(PropertyIdentifier.PriorityArray); priorityArray.set((int)pri, createCommandValue(value)); setCommandableImpl(priorityArray); }
private void setCommandableImpl(PriorityArray priorityArray) { PriorityValue priorityValue = null; foreach (PriorityValue priv in priorityArray) { if (!priv.IsNull) { priorityValue = priv; break; } } Encodable newValue = getProperty(PropertyIdentifier.RelinquishDefault); if (priorityValue != null) { newValue = priorityValue.Value; } setPropertyImpl(PropertyIdentifier.PresentValue, newValue); }