示例#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;
 }