Esempio n. 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);
        }
Esempio n. 2
0
 public CcuDevice(ICcuDeviceInfo deviceInfo, IHomeMaticXmlRpcApi xmlRpcApi) : base(deviceInfo, xmlRpcApi)
 {
     _channels = new List <ICcuDeviceChannel>();
 }
Esempio n. 3
0
 protected CcuDeviceBase(ICcuDeviceInfo deviceInfo, IHomeMaticXmlRpcApi xmlRpcApi)
 {
     DeviceInfo = deviceInfo;
     XmlRpcApi  = xmlRpcApi;
 }
Esempio n. 4
0
 public CcuDeviceChannel(ICcuDevice parent, ICcuDeviceInfo channelInfo, IHomeMaticXmlRpcApi xmlRpcApi) : base(channelInfo, xmlRpcApi)
 {
     Parent = parent;
 }