Пример #1
0
        private ICcuDevice CreateDevice(ICcuDeviceInfo deviceInfo, IEnumerable <ICcuDeviceInfo> deviceInfos)
        {
            var device = new CcuDevice(deviceInfo, XmlRpcApi);

            device.AddChannels(
                deviceInfos
                .Where(x => x.IsChannel && x.Parent == deviceInfo.Address)
                .Select(x => new CcuDeviceChannel(device, x, XmlRpcApi)));

            return(device);
        }
Пример #2
0
 public CcuDevice(ICcuDeviceInfo deviceInfo, IHomeMaticXmlRpcApi xmlRpcApi) : base(deviceInfo, xmlRpcApi)
 {
     _channels = new List <ICcuDeviceChannel>();
 }
Пример #3
0
 protected CcuDeviceBase(ICcuDeviceInfo deviceInfo, IHomeMaticXmlRpcApi xmlRpcApi)
 {
     DeviceInfo = deviceInfo;
     XmlRpcApi  = xmlRpcApi;
 }
Пример #4
0
 public CcuDeviceChannel(ICcuDevice parent, ICcuDeviceInfo channelInfo, IHomeMaticXmlRpcApi xmlRpcApi) : base(channelInfo, xmlRpcApi)
 {
     Parent = parent;
 }