示例#1
0
        public static IList GetValues(BACnetObject obj)
        {
            IList values = new ArrayList();

            foreach (PropertyIdentifier pid in supportedPropertyIdentifiers)
            {
                AddValue(obj, values, pid);
            }
            return(values);
        }
示例#2
0
 private static void AddValue(BACnetObject obj, IList values, PropertyIdentifier pid)
 {
     try
     {
         // Ensure that the obj has the given property. The addition of doorAlarmState requires this.
         if (ObjectProperties.getPropertyTypeDefinition(obj.Id.ObjectType, pid) != null)
         {
             Encodable value = obj.getProperty(pid);
             if (value != null)
             {
                 values.Add(new PropertyValue(pid, value));
             }
         }
     }
     catch (BACnetServiceException e)
     {
         // Should never happen, so wrap in a RuntimeException
         throw e;
     }
 }