Example #1
0
        public List<Device> ListDevicesByCaps(Room rm, EDeviceCapabilities caps)
        {
            List<Device> ret = new List<Device>();
            if (rm == null)
            {
                foreach (Room r in mRooms)
                {
                    ret.AddRange(ListDevicesByCaps(r, caps));
                }
            }
            else
            {
                foreach (Device d in rm.ListDevices())
                {
                    if ((d.Capabilities.Caps & caps) == caps) ret.Add(d);
                }
            }

            return ret;
        }