Exemple #1
0
        /// <summary>
        /// Create a new switched keypad device.
        /// </summary>
        /// <param name="coms"></param>
        /// <param name="id"></param>
        /// <param name="category"></param>
        /// <param name="subcategory"></param>
        public KeypadSwitched(InsteonCommunication coms, DeviceId id, byte category, byte subcategory)
            : base(coms, id, category, subcategory)
        {
            switch (subcategory)
            {
            case 0x5:
                numKeys = 8;
                break;

            case 0x0f:
            case 0x1e:
                numKeys = 6;
                break;
            }
        }
Exemple #2
0
 /// <summary>
 /// All the basic parts of the device, initialized here.
 /// </summary>
 /// <param name="coms"></param>
 /// <param name="deviceId"></param>
 /// <param name="category"></param>
 /// <param name="subcategory"></param>
 public DeviceBase(InsteonCommunication coms, DeviceId deviceId, byte category, byte subcategory)
 {
     this.coms        = coms;
     this.deviceId    = deviceId;
     this.category    = category;
     this.subcategory = subcategory;
     if (DeviceSubcategoryLookup.ContainsKey(category))
     {
         DeviceCategoryData data = DeviceSubcategoryLookup[category];
         if (data.SubCategories.ContainsKey(subcategory))
         {
             this.deviceName = data.SubCategories[subcategory];
         }
         else
         {
             this.deviceName = String.Format(data.DefaultName, subcategory);
         }
     }
     else
     {
         this.deviceName = String.Format("Unknown Device {0:x} sub: {1:x}", category, subcategory);
     }
 }
Exemple #3
0
 public DimmingLight(InsteonCommunication coms, DeviceId id, byte category, byte subcategory) : base(coms, id, category, subcategory)
 {
 }
Exemple #4
0
 public DeviceFactory(InsteonCommunication coms)
 {
     this.coms = coms;
 }
 public DeviceFactory(InsteonCommunication coms)
 {
     this.coms = coms;
 }
 public PoolAndSpaDevice(InsteonCommunication coms, DeviceId id, byte category, byte subcategory)
     : base(coms, id, category, subcategory)
 {
 }
 public PowerLineModule(InsteonCommunication coms, DeviceId deviceId, byte category, byte subcategory, byte firmwareVersion)
     : base(coms, deviceId, category, subcategory)
 {
 }
 public PowerLineModule(InsteonCommunication coms, DeviceId deviceId, byte category, byte subcategory, byte firmwareVersion)
     : base(coms, deviceId, category, subcategory)
 {
 }
 public DimmingLight(InsteonCommunication coms, DeviceId id, byte category, byte subcategory)
     : base(coms, id, category, subcategory)
 {
 }
 /// <summary>
 /// The constructor for the on/off device.
 /// </summary>
 /// <param name="cms"></param>
 /// <param name="id"></param>
 /// <param name="category"></param>
 /// <param name="subcategory"></param>
 public OnOffDevice(InsteonCommunication coms, DeviceId id, byte category, byte subcategory)
     : base(coms, id, category, subcategory)
 {
     this.hasStatus = false;
     this.onLevel = 0;
 }
 /// <summary>
 /// All the basic parts of the device, initialized here.
 /// </summary>
 /// <param name="coms"></param>
 /// <param name="deviceId"></param>
 /// <param name="category"></param>
 /// <param name="subcategory"></param>
 public DeviceBase(InsteonCommunication coms, DeviceId deviceId, byte category, byte subcategory)
 {
     this.coms = coms;
     this.deviceId = deviceId;
     this.category = category;
     this.subcategory = subcategory;
     if (DeviceSubcategoryLookup.ContainsKey(category))
     {
         DeviceCategoryData data = DeviceSubcategoryLookup[category];
         if (data.SubCategories.ContainsKey(subcategory))
         {
             this.deviceName = data.SubCategories[subcategory];
         }
         else
         {
             this.deviceName = String.Format(data.DefaultName, subcategory);
         }
     }
     else
     {
         this.deviceName = String.Format("Unknown Device {0:x} sub: {1:x}", category, subcategory);
     }
 }
 public Thermostat(InsteonCommunication coms, DeviceId id, byte category, byte subcategory)
     : base(coms, id, category, subcategory)
 {
 }
Exemple #13
0
 /// <summary>
 /// The constructor for the on/off device.
 /// </summary>
 /// <param name="cms"></param>
 /// <param name="id"></param>
 /// <param name="category"></param>
 /// <param name="subcategory"></param>
 public OnOffDevice(InsteonCommunication coms, DeviceId id, byte category, byte subcategory)
     : base(coms, id, category, subcategory)
 {
     this.hasStatus = false;
     this.onLevel   = 0;
 }
 public PoolAndSpaDevice(InsteonCommunication coms, DeviceId id, byte category, byte subcategory)
     : base(coms, id, category, subcategory)
 {
 }