예제 #1
0
        // Attribute initialisation
        protected override Dictionary <ushort, ZclAttribute> InitializeAttributes()
        {
            Dictionary <ushort, ZclAttribute> attributeMap = new Dictionary <ushort, ZclAttribute>(19);

            ZclClusterType colorControl = ZclClusterType.GetValueById(ClusterType.COLOR_CONTROL);

            attributeMap.Add(ATTR_CURRENTHUE, new ZclAttribute(colorControl, ATTR_CURRENTHUE, "CurrentHue", ZclDataType.Get(DataType.UNSIGNED_8_BIT_INTEGER), false, true, false, true));
            attributeMap.Add(ATTR_CURRENTSATURATION, new ZclAttribute(colorControl, ATTR_CURRENTSATURATION, "CurrentSaturation", ZclDataType.Get(DataType.UNSIGNED_8_BIT_INTEGER), false, true, false, true));
            attributeMap.Add(ATTR_REMAININGTIME, new ZclAttribute(colorControl, ATTR_REMAININGTIME, "RemainingTime", ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER), false, true, false, false));
            attributeMap.Add(ATTR_CURRENTX, new ZclAttribute(colorControl, ATTR_CURRENTX, "CurrentX", ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER), true, true, false, true));
            attributeMap.Add(ATTR_CURRENTY, new ZclAttribute(colorControl, ATTR_CURRENTY, "CurrentY", ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER), true, true, false, true));
            attributeMap.Add(ATTR_DRIFTCOMPENSATION, new ZclAttribute(colorControl, ATTR_DRIFTCOMPENSATION, "DriftCompensation", ZclDataType.Get(DataType.ENUMERATION_8_BIT), false, true, false, false));
            attributeMap.Add(ATTR_COMPENSATIONTEXT, new ZclAttribute(colorControl, ATTR_COMPENSATIONTEXT, "CompensationText", ZclDataType.Get(DataType.CHARACTER_STRING), false, true, false, false));
            attributeMap.Add(ATTR_COLORTEMPERATURE, new ZclAttribute(colorControl, ATTR_COLORTEMPERATURE, "ColorTemperature", ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER), false, true, false, true));
            attributeMap.Add(ATTR_COLORMODE, new ZclAttribute(colorControl, ATTR_COLORMODE, "ColorMode", ZclDataType.Get(DataType.ENUMERATION_8_BIT), false, true, false, false));
            attributeMap.Add(ATTR_ENHANCEDCURRENTHUE, new ZclAttribute(colorControl, ATTR_ENHANCEDCURRENTHUE, "EnhancedCurrentHue", ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER), false, true, false, true));
            attributeMap.Add(ATTR_ENHANCEDCOLORMODE, new ZclAttribute(colorControl, ATTR_ENHANCEDCOLORMODE, "EnhancedColorMode", ZclDataType.Get(DataType.ENUMERATION_8_BIT), false, true, false, false));
            attributeMap.Add(ATTR_COLORLOOPACTIVE, new ZclAttribute(colorControl, ATTR_COLORLOOPACTIVE, "ColorLoopActive", ZclDataType.Get(DataType.UNSIGNED_8_BIT_INTEGER), false, true, false, false));
            attributeMap.Add(ATTR_COLORLOOPDIRECTION, new ZclAttribute(colorControl, ATTR_COLORLOOPDIRECTION, "ColorLoopDirection", ZclDataType.Get(DataType.UNSIGNED_8_BIT_INTEGER), false, true, false, false));
            attributeMap.Add(ATTR_COLORLOOPTIME, new ZclAttribute(colorControl, ATTR_COLORLOOPTIME, "ColorLoopTime", ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER), false, true, false, false));
            attributeMap.Add(ATTR_COLORLOOPSTARTHUE, new ZclAttribute(colorControl, ATTR_COLORLOOPSTARTHUE, "ColorLoopStartHue", ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER), false, true, false, false));
            attributeMap.Add(ATTR_COLORLOOPSTOREDHUE, new ZclAttribute(colorControl, ATTR_COLORLOOPSTOREDHUE, "ColorLoopStoredHue", ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER), false, true, false, false));
            attributeMap.Add(ATTR_COLORCAPABILITIES, new ZclAttribute(colorControl, ATTR_COLORCAPABILITIES, "ColorCapabilities", ZclDataType.Get(DataType.BITMAP_16_BIT), false, true, false, false));
            attributeMap.Add(ATTR_COLORTEMPERATUREMIN, new ZclAttribute(colorControl, ATTR_COLORTEMPERATUREMIN, "ColorTemperatureMin", ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER), false, true, false, false));
            attributeMap.Add(ATTR_COLORTEMPERATUREMAX, new ZclAttribute(colorControl, ATTR_COLORTEMPERATUREMAX, "ColorTemperatureMax", ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER), false, true, false, false));

            return(attributeMap);
        }
예제 #2
0
        // Attribute initialisation
        protected override Dictionary <ushort, ZclAttribute> InitializeAttributes()
        {
            Dictionary <ushort, ZclAttribute> attributeMap = new Dictionary <ushort, ZclAttribute>(26);

            ZclClusterType thermostat = ZclClusterType.GetValueById(ClusterType.THERMOSTAT);

            attributeMap.Add(ATTR_LOCALTEMPERATURE, new ZclAttribute(thermostat, ATTR_LOCALTEMPERATURE, "LocalTemperature", ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER), true, true, false, true));
            attributeMap.Add(ATTR_OUTDOORTEMPERATURE, new ZclAttribute(thermostat, ATTR_OUTDOORTEMPERATURE, "OutdoorTemperature", ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER), false, true, false, false));
            attributeMap.Add(ATTR_OCCUPANCY, new ZclAttribute(thermostat, ATTR_OCCUPANCY, "Occupancy", ZclDataType.Get(DataType.BITMAP_8_BIT), false, true, false, false));
            attributeMap.Add(ATTR_ABSMINHEATSETPOINTLIMIT, new ZclAttribute(thermostat, ATTR_ABSMINHEATSETPOINTLIMIT, "AbsMinHeatSetpointLimit", ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER), false, true, false, false));
            attributeMap.Add(ATTR_ABSMAXHEATSETPOINTLIMIT, new ZclAttribute(thermostat, ATTR_ABSMAXHEATSETPOINTLIMIT, "AbsMaxHeatSetpointLimit", ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER), false, true, false, false));
            attributeMap.Add(ATTR_ABSMINCOOLSETPOINTLIMIT, new ZclAttribute(thermostat, ATTR_ABSMINCOOLSETPOINTLIMIT, "AbsMinCoolSetpointLimit", ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER), false, true, false, false));
            attributeMap.Add(ATTR_ABSMAXCOOLSETPOINTLIMIT, new ZclAttribute(thermostat, ATTR_ABSMAXCOOLSETPOINTLIMIT, "AbsMaxCoolSetpointLimit", ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER), false, true, false, false));
            attributeMap.Add(ATTR_PICOOLINGDEMAND, new ZclAttribute(thermostat, ATTR_PICOOLINGDEMAND, "PICoolingDemand", ZclDataType.Get(DataType.UNSIGNED_8_BIT_INTEGER), false, true, false, true));
            attributeMap.Add(ATTR_PIHEATINGDEMAND, new ZclAttribute(thermostat, ATTR_PIHEATINGDEMAND, "PIHeatingDemand", ZclDataType.Get(DataType.UNSIGNED_8_BIT_INTEGER), false, true, false, true));
            attributeMap.Add(ATTR_HVACSYSTEMTYPECONFIGURATION, new ZclAttribute(thermostat, ATTR_HVACSYSTEMTYPECONFIGURATION, "HVACSystemTypeConfiguration", ZclDataType.Get(DataType.BITMAP_8_BIT), false, true, false, false));
            attributeMap.Add(ATTR_LOCALTEMPERATURECALIBRATION, new ZclAttribute(thermostat, ATTR_LOCALTEMPERATURECALIBRATION, "LocalTemperatureCalibration", ZclDataType.Get(DataType.UNSIGNED_8_BIT_INTEGER), false, true, false, false));
            attributeMap.Add(ATTR_OCCUPIEDCOOLINGSETPOINT, new ZclAttribute(thermostat, ATTR_OCCUPIEDCOOLINGSETPOINT, "OccupiedCoolingSetpoint", ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER), true, true, false, false));
            attributeMap.Add(ATTR_OCCUPIEDHEATINGSETPOINT, new ZclAttribute(thermostat, ATTR_OCCUPIEDHEATINGSETPOINT, "OccupiedHeatingSetpoint", ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER), true, true, false, false));
            attributeMap.Add(ATTR_UNOCCUPIEDCOOLINGSETPOINT, new ZclAttribute(thermostat, ATTR_UNOCCUPIEDCOOLINGSETPOINT, "UnoccupiedCoolingSetpoint", ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER), false, true, false, false));
            attributeMap.Add(ATTR_UNOCCUPIEDHEATINGSETPOINT, new ZclAttribute(thermostat, ATTR_UNOCCUPIEDHEATINGSETPOINT, "UnoccupiedHeatingSetpoint", ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER), false, true, false, false));
            attributeMap.Add(ATTR_MINHEATSETPOINTLIMIT, new ZclAttribute(thermostat, ATTR_MINHEATSETPOINTLIMIT, "MinHeatSetpointLimit", ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER), false, true, false, false));
            attributeMap.Add(ATTR_MAXHEATSETPOINTLIMIT, new ZclAttribute(thermostat, ATTR_MAXHEATSETPOINTLIMIT, "MaxHeatSetpointLimit", ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER), false, true, false, false));
            attributeMap.Add(ATTR_MINCOOLSETPOINTLIMIT, new ZclAttribute(thermostat, ATTR_MINCOOLSETPOINTLIMIT, "MinCoolSetpointLimit", ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER), false, true, false, false));
            attributeMap.Add(ATTR_MAXCOOLSETPOINTLIMIT, new ZclAttribute(thermostat, ATTR_MAXCOOLSETPOINTLIMIT, "MaxCoolSetpointLimit", ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER), false, true, false, false));
            attributeMap.Add(ATTR_MINSETPOINTDEADBAND, new ZclAttribute(thermostat, ATTR_MINSETPOINTDEADBAND, "MinSetpointDeadBand", ZclDataType.Get(DataType.UNSIGNED_8_BIT_INTEGER), false, true, false, false));
            attributeMap.Add(ATTR_REMOTESENSING, new ZclAttribute(thermostat, ATTR_REMOTESENSING, "RemoteSensing", ZclDataType.Get(DataType.BITMAP_8_BIT), false, true, false, false));
            attributeMap.Add(ATTR_CONTROLSEQUENCEOFOPERATION, new ZclAttribute(thermostat, ATTR_CONTROLSEQUENCEOFOPERATION, "ControlSequenceOfOperation", ZclDataType.Get(DataType.ENUMERATION_8_BIT), true, true, false, false));
            attributeMap.Add(ATTR_SYSTEMMODE, new ZclAttribute(thermostat, ATTR_SYSTEMMODE, "SystemMode", ZclDataType.Get(DataType.ENUMERATION_8_BIT), true, true, false, false));
            attributeMap.Add(ATTR_ALARMMASK, new ZclAttribute(thermostat, ATTR_ALARMMASK, "AlarmMask", ZclDataType.Get(DataType.ENUMERATION_8_BIT), false, true, false, false));
            attributeMap.Add(ATTR_THERMOSTATRUNNINGMODE, new ZclAttribute(thermostat, ATTR_THERMOSTATRUNNINGMODE, "ThermostatRunningMode", ZclDataType.Get(DataType.ENUMERATION_8_BIT), false, true, false, false));
            attributeMap.Add(ATTR_ACERRORCODE, new ZclAttribute(thermostat, ATTR_ACERRORCODE, "ACErrorCode", ZclDataType.Get(DataType.BITMAP_32_BIT), false, true, false, false));

            return(attributeMap);
        }
예제 #3
0
        // Attribute initialisation
        protected override Dictionary <ushort, ZclAttribute> InitializeAttributes()
        {
            Dictionary <ushort, ZclAttribute> attributeMap = new Dictionary <ushort, ZclAttribute>(23);

            ZclClusterType powerconfiguration = ZclClusterType.GetValueById(ClusterType.POWER_CONFIGURATION);

            attributeMap.Add(ATTR_MAINSVOLTAGE, new ZclAttribute(powerconfiguration, ATTR_MAINSVOLTAGE, "MainsVoltage", ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER), false, true, false, false));
            attributeMap.Add(ATTR_MAINSFREQUENCY, new ZclAttribute(powerconfiguration, ATTR_MAINSFREQUENCY, "MainsFrequency", ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER), false, true, false, false));
            attributeMap.Add(ATTR_MAINSALARMMASK, new ZclAttribute(powerconfiguration, ATTR_MAINSALARMMASK, "MainsAlarmMask", ZclDataType.Get(DataType.BITMAP_8_BIT), false, true, true, false));
            attributeMap.Add(ATTR_MAINSVOLTAGEMINTHRESHOLD, new ZclAttribute(powerconfiguration, ATTR_MAINSVOLTAGEMINTHRESHOLD, "MainsVoltageMinThreshold", ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER), false, true, true, false));
            attributeMap.Add(ATTR_MAINSVOLTAGEMAXTHRESHOLD, new ZclAttribute(powerconfiguration, ATTR_MAINSVOLTAGEMAXTHRESHOLD, "MainsVoltageMaxThreshold", ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER), false, true, true, false));
            attributeMap.Add(ATTR_MAINSVOLTAGEDWELLTRIPPOINT, new ZclAttribute(powerconfiguration, ATTR_MAINSVOLTAGEDWELLTRIPPOINT, "MainsVoltageDwellTripPoint", ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER), false, true, true, false));
            attributeMap.Add(ATTR_BATTERYVOLTAGE, new ZclAttribute(powerconfiguration, ATTR_BATTERYVOLTAGE, "BatteryVoltage", ZclDataType.Get(DataType.UNSIGNED_8_BIT_INTEGER), false, true, false, false));
            attributeMap.Add(ATTR_BATTERYPERCENTAGEREMAINING, new ZclAttribute(powerconfiguration, ATTR_BATTERYPERCENTAGEREMAINING, "BatteryPercentageRemaining", ZclDataType.Get(DataType.UNSIGNED_8_BIT_INTEGER), false, true, false, true));
            attributeMap.Add(ATTR_BATTERYMANUFACTURER, new ZclAttribute(powerconfiguration, ATTR_BATTERYMANUFACTURER, "BatteryManufacturer", ZclDataType.Get(DataType.CHARACTER_STRING), false, true, true, false));
            attributeMap.Add(ATTR_BATTERYSIZE, new ZclAttribute(powerconfiguration, ATTR_BATTERYSIZE, "BatterySize", ZclDataType.Get(DataType.ENUMERATION_8_BIT), false, true, true, false));
            attributeMap.Add(ATTR_BATTERYAHRRATING, new ZclAttribute(powerconfiguration, ATTR_BATTERYAHRRATING, "BatteryAHrRating", ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER), false, true, true, false));
            attributeMap.Add(ATTR_BATTERYQUANTITY, new ZclAttribute(powerconfiguration, ATTR_BATTERYQUANTITY, "BatteryQuantity", ZclDataType.Get(DataType.UNSIGNED_8_BIT_INTEGER), false, true, true, false));
            attributeMap.Add(ATTR_BATTERYRATEDVOLTAGE, new ZclAttribute(powerconfiguration, ATTR_BATTERYRATEDVOLTAGE, "BatteryRatedVoltage", ZclDataType.Get(DataType.UNSIGNED_8_BIT_INTEGER), false, true, true, false));
            attributeMap.Add(ATTR_BATTERYALARMMASK, new ZclAttribute(powerconfiguration, ATTR_BATTERYALARMMASK, "BatteryAlarmMask", ZclDataType.Get(DataType.BITMAP_8_BIT), false, true, true, false));
            attributeMap.Add(ATTR_BATTERYVOLTAGEMINTHRESHOLD, new ZclAttribute(powerconfiguration, ATTR_BATTERYVOLTAGEMINTHRESHOLD, "BatteryVoltageMinThreshold", ZclDataType.Get(DataType.UNSIGNED_8_BIT_INTEGER), false, true, true, false));
            attributeMap.Add(ATTR_BATTERYVOLTAGETHRESHOLD1, new ZclAttribute(powerconfiguration, ATTR_BATTERYVOLTAGETHRESHOLD1, "BatteryVoltageThreshold1", ZclDataType.Get(DataType.UNSIGNED_8_BIT_INTEGER), false, true, true, false));
            attributeMap.Add(ATTR_BATTERYVOLTAGETHRESHOLD2, new ZclAttribute(powerconfiguration, ATTR_BATTERYVOLTAGETHRESHOLD2, "BatteryVoltageThreshold2", ZclDataType.Get(DataType.UNSIGNED_8_BIT_INTEGER), false, true, true, false));
            attributeMap.Add(ATTR_BATTERYVOLTAGETHRESHOLD3, new ZclAttribute(powerconfiguration, ATTR_BATTERYVOLTAGETHRESHOLD3, "BatteryVoltageThreshold3", ZclDataType.Get(DataType.UNSIGNED_8_BIT_INTEGER), false, true, true, false));
            attributeMap.Add(ATTR_BATTERYPERCENTAGEMINTHRESHOLD, new ZclAttribute(powerconfiguration, ATTR_BATTERYPERCENTAGEMINTHRESHOLD, "BatteryPercentageMinThreshold", ZclDataType.Get(DataType.UNSIGNED_8_BIT_INTEGER), false, true, true, false));
            attributeMap.Add(ATTR_BATTERYPERCENTAGETHRESHOLD1, new ZclAttribute(powerconfiguration, ATTR_BATTERYPERCENTAGETHRESHOLD1, "BatteryPercentageThreshold1", ZclDataType.Get(DataType.UNSIGNED_8_BIT_INTEGER), false, true, true, false));
            attributeMap.Add(ATTR_BATTERYPERCENTAGETHRESHOLD2, new ZclAttribute(powerconfiguration, ATTR_BATTERYPERCENTAGETHRESHOLD2, "BatteryPercentageThreshold2", ZclDataType.Get(DataType.UNSIGNED_8_BIT_INTEGER), false, true, true, false));
            attributeMap.Add(ATTR_BATTERYPERCENTAGETHRESHOLD3, new ZclAttribute(powerconfiguration, ATTR_BATTERYPERCENTAGETHRESHOLD3, "BatteryPercentageThreshold3", ZclDataType.Get(DataType.UNSIGNED_8_BIT_INTEGER), false, true, true, false));
            attributeMap.Add(ATTR_BATTERYALARMSTATE, new ZclAttribute(powerconfiguration, ATTR_BATTERYALARMSTATE, "BatteryAlarmState", ZclDataType.Get(DataType.BITMAP_32_BIT), false, true, false, false));

            return(attributeMap);
        }
예제 #4
0
        private ZclCluster GetClusterClass(ushort clusterId)
        {
            ZclClusterType clusterType = ZclClusterType.GetValueById(clusterId);

            if (clusterType == null)
            {
                // Unsupported cluster
                _logger.Debug("{}: Unsupported cluster {}", GetEndpointAddress(), clusterId);
                return(null);
            }

            // Create a cluster class
            ZclCluster cluster = null;


            throw new NotImplementedException();
            //    Constructor <? extends ZclCluster > constructor;
            //    // try {
            //    try
            //    {
            //        constructor = clusterType.getClusterClass().getConstructor(ZigBeeNetworkManager.class,
            //            ZigBeeEndpoint.class);
            //    cluster = constructor.newInstance(networkManager, this);
            //} catch (NoSuchMethodException | SecurityException | InstantiationException | IllegalAccessException
            //        | IllegalArgumentException | InvocationTargetException e) {
            //    logger.debug("{}: Error instantiating cluster {}", getEndpointAddress(), clusterType);
            //    return null;
            //}

            return(cluster);
        }
예제 #5
0
        public override string ToString()
        {
            StringBuilder builder = new StringBuilder()
                                    .Append(ZclClusterType.GetValueById(ClusterId).Label)
                                    .Append(": ")
                                    .Append(base.ToString());

            return(builder.ToString());
        }
예제 #6
0
        // Attribute initialisation
        protected override Dictionary <ushort, ZclAttribute> InitializeAttributes()
        {
            Dictionary <ushort, ZclAttribute> attributeMap = new Dictionary <ushort, ZclAttribute>(1);

            ZclClusterType identify = ZclClusterType.GetValueById(ClusterType.IDENTIFY);

            attributeMap.Add(ATTR_IDENTIFYTIME, new ZclAttribute(identify, ATTR_IDENTIFYTIME, "IdentifyTime", ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER), true, true, true, false));

            return(attributeMap);
        }
예제 #7
0
        // Attribute initialisation
        protected override Dictionary <ushort, ZclAttribute> InitializeAttributes()
        {
            Dictionary <ushort, ZclAttribute> attributeMap = new Dictionary <ushort, ZclAttribute>(1);

            ZclClusterType alarms = ZclClusterType.GetValueById(ClusterType.ALARMS);

            attributeMap.Add(ATTR_ALARMCOUNT, new ZclAttribute(alarms, ATTR_ALARMCOUNT, "AlarmCount", ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER), false, true, false, false));

            return(attributeMap);
        }
예제 #8
0
        public override string ToString()
        {
            ZclClusterType clusterType = ZclClusterType.GetValueById(ClusterId);

            StringBuilder builder = new StringBuilder()
                                    .Append(clusterType != null ? clusterType.Label : ClusterId.ToString())
                                    .Append(": ")
                                    .Append(base.ToString());

            return(builder.ToString());
        }
예제 #9
0
        // Attribute initialisation
        protected override Dictionary <ushort, ZclAttribute> InitializeAttributes()
        {
            Dictionary <ushort, ZclAttribute> attributeMap = new Dictionary <ushort, ZclAttribute>(2);

            ZclClusterType onoffSwitchConfiguration = ZclClusterType.GetValueById(ClusterType.ON_OFF_SWITCH_CONFIGURATION);

            attributeMap.Add(ATTR_SWITCHTYPE, new ZclAttribute(onoffSwitchConfiguration, ATTR_SWITCHTYPE, "SwitchType", ZclDataType.Get(DataType.ENUMERATION_8_BIT), true, true, false, false));
            attributeMap.Add(ATTR_SWITCHACTIONS, new ZclAttribute(onoffSwitchConfiguration, ATTR_SWITCHACTIONS, "SwitchActions", ZclDataType.Get(DataType.ENUMERATION_8_BIT), true, true, true, false));

            return(attributeMap);
        }
        // Attribute initialisation
        protected override Dictionary <ushort, ZclAttribute> InitializeAttributes()
        {
            Dictionary <ushort, ZclAttribute> attributeMap = new Dictionary <ushort, ZclAttribute>(3);

            ZclClusterType illuminancelevelsensing = ZclClusterType.GetValueById(ClusterType.ILLUMINANCE_LEVEL_SENSING);

            attributeMap.Add(ATTR_LEVELSTATUS, new ZclAttribute(illuminancelevelsensing, ATTR_LEVELSTATUS, "LevelStatus", ZclDataType.Get(DataType.ENUMERATION_8_BIT), true, true, false, true));
            attributeMap.Add(ATTR_LIGHTSENSORTYPE, new ZclAttribute(illuminancelevelsensing, ATTR_LIGHTSENSORTYPE, "LightSensorType", ZclDataType.Get(DataType.ENUMERATION_8_BIT), false, true, false, false));
            attributeMap.Add(ATTR_ILLUMINANCETARGETLEVEL, new ZclAttribute(illuminancelevelsensing, ATTR_ILLUMINANCETARGETLEVEL, "IlluminanceTargetLevel", ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER), false, true, false, false));

            return(attributeMap);
        }
        // Attribute initialisation
        protected override Dictionary <ushort, ZclAttribute> InitializeAttributes()
        {
            Dictionary <ushort, ZclAttribute> attributeMap = new Dictionary <ushort, ZclAttribute>(4);

            ZclClusterType relativehumiditymeasurement = ZclClusterType.GetValueById(ClusterType.RELATIVE_HUMIDITY_MEASUREMENT);

            attributeMap.Add(ATTR_MEASUREDVALUE, new ZclAttribute(relativehumiditymeasurement, ATTR_MEASUREDVALUE, "MeasuredValue", ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER), true, true, false, true));
            attributeMap.Add(ATTR_MINMEASUREDVALUE, new ZclAttribute(relativehumiditymeasurement, ATTR_MINMEASUREDVALUE, "MinMeasuredValue", ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER), true, true, false, false));
            attributeMap.Add(ATTR_MAXMEASUREDVALUE, new ZclAttribute(relativehumiditymeasurement, ATTR_MAXMEASUREDVALUE, "MaxMeasuredValue", ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER), true, true, false, false));
            attributeMap.Add(ATTR_TOLERANCE, new ZclAttribute(relativehumiditymeasurement, ATTR_TOLERANCE, "Tolerance", ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER), false, true, false, true));

            return(attributeMap);
        }
예제 #12
0
        // Attribute initialisation
        protected override Dictionary <ushort, ZclAttribute> InitializeAttributes()
        {
            Dictionary <ushort, ZclAttribute> attributeMap = new Dictionary <ushort, ZclAttribute>(4);

            ZclClusterType iASWD = ZclClusterType.GetValueById(ClusterType.IAS_WD);

            attributeMap.Add(ATTR_MAXDURATION, new ZclAttribute(iASWD, ATTR_MAXDURATION, "MaxDuration", ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER), true, true, true, false));
            attributeMap.Add(ATTR_ZONETYPE, new ZclAttribute(iASWD, ATTR_ZONETYPE, "ZoneType", ZclDataType.Get(DataType.ENUMERATION_8_BIT), true, true, false, false));
            attributeMap.Add(ATTR_ZONESTATUS, new ZclAttribute(iASWD, ATTR_ZONESTATUS, "ZoneStatus", ZclDataType.Get(DataType.BITMAP_16_BIT), true, true, false, false));
            attributeMap.Add(ATTR_IAS_CIE_ADDRESS, new ZclAttribute(iASWD, ATTR_IAS_CIE_ADDRESS, "IAS_CIE_Address", ZclDataType.Get(DataType.IEEE_ADDRESS), true, true, true, false));

            return(attributeMap);
        }
예제 #13
0
        // Attribute initialisation
        protected override Dictionary <ushort, ZclAttribute> InitializeAttributes()
        {
            Dictionary <ushort, ZclAttribute> attributeMap = new Dictionary <ushort, ZclAttribute>(4);

            ZclClusterType onOff = ZclClusterType.GetValueById(ClusterType.ON_OFF);

            attributeMap.Add(ATTR_ONOFF, new ZclAttribute(onOff, ATTR_ONOFF, "OnOff", ZclDataType.Get(DataType.BOOLEAN), true, true, false, true));
            attributeMap.Add(ATTR_GLOBALSCENECONTROL, new ZclAttribute(onOff, ATTR_GLOBALSCENECONTROL, "GlobalSceneControl", ZclDataType.Get(DataType.BOOLEAN), false, true, false, false));
            attributeMap.Add(ATTR_OFFTIME, new ZclAttribute(onOff, ATTR_OFFTIME, "OffTime", ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER), false, true, true, false));
            attributeMap.Add(ATTR_OFFWAITTIME, new ZclAttribute(onOff, ATTR_OFFWAITTIME, "OffWaitTime", ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER), false, true, true, false));

            return(attributeMap);
        }
        // Attribute initialisation
        protected override Dictionary <ushort, ZclAttribute> InitializeAttributes()
        {
            Dictionary <ushort, ZclAttribute> attributeMap = new Dictionary <ushort, ZclAttribute>(5);

            ZclClusterType illuminancemeasurement = ZclClusterType.GetValueById(ClusterType.ILLUMINANCE_MEASUREMENT);

            attributeMap.Add(ATTR_MEASUREDVALUE, new ZclAttribute(illuminancemeasurement, ATTR_MEASUREDVALUE, "MeasuredValue", ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER), true, true, false, true));
            attributeMap.Add(ATTR_MINMEASUREDVALUE, new ZclAttribute(illuminancemeasurement, ATTR_MINMEASUREDVALUE, "MinMeasuredValue", ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER), true, true, false, false));
            attributeMap.Add(ATTR_MAXMEASUREDVALUE, new ZclAttribute(illuminancemeasurement, ATTR_MAXMEASUREDVALUE, "MaxMeasuredValue", ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER), true, true, false, false));
            attributeMap.Add(ATTR_TOLERANCE, new ZclAttribute(illuminancemeasurement, ATTR_TOLERANCE, "Tolerance", ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER), false, true, false, true));
            attributeMap.Add(ATTR_LIGHTSENSORTYPE, new ZclAttribute(illuminancemeasurement, ATTR_LIGHTSENSORTYPE, "LightSensorType", ZclDataType.Get(DataType.ENUMERATION_8_BIT), false, true, false, false));

            return(attributeMap);
        }
예제 #15
0
        public ZclCluster GetClusterClass(ushort clusterId)
        {
            ZclClusterType clusterType = ZclClusterType.GetValueById(clusterId);

            if (clusterType == null)
            {
                // Unsupported cluster
                Log.Debug("{Endpoint}: Unsupported cluster {Cluster} - using ZclCustomCluster", GetEndpointAddress(), clusterId);
                return(new ZclCustomCluster(this, clusterId));
            }

            // Create a cluster class
            return(clusterType.ClusterFactory(this));
        }
예제 #16
0
        // Attribute initialisation
        protected override Dictionary <ushort, ZclAttribute> InitializeAttributes()
        {
            Dictionary <ushort, ZclAttribute> attributeMap = new Dictionary <ushort, ZclAttribute>(6);

            ZclClusterType scenes = ZclClusterType.GetValueById(ClusterType.SCENES);

            attributeMap.Add(ATTR_SCENECOUNT, new ZclAttribute(scenes, ATTR_SCENECOUNT, "SceneCount", ZclDataType.Get(DataType.UNSIGNED_8_BIT_INTEGER), true, true, false, false));
            attributeMap.Add(ATTR_CURRENTSCENE, new ZclAttribute(scenes, ATTR_CURRENTSCENE, "CurrentScene", ZclDataType.Get(DataType.UNSIGNED_8_BIT_INTEGER), true, true, false, false));
            attributeMap.Add(ATTR_CURRENTGROUP, new ZclAttribute(scenes, ATTR_CURRENTGROUP, "CurrentGroup", ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER), true, true, false, false));
            attributeMap.Add(ATTR_SCENEVALID, new ZclAttribute(scenes, ATTR_SCENEVALID, "SceneValid", ZclDataType.Get(DataType.BOOLEAN), true, true, false, false));
            attributeMap.Add(ATTR_NAMESUPPORT, new ZclAttribute(scenes, ATTR_NAMESUPPORT, "NameSupport", ZclDataType.Get(DataType.BITMAP_8_BIT), true, true, false, false));
            attributeMap.Add(ATTR_LASTCONFIGUREDBY, new ZclAttribute(scenes, ATTR_LASTCONFIGUREDBY, "LastConfiguredBy", ZclDataType.Get(DataType.IEEE_ADDRESS), false, true, false, false));

            return(attributeMap);
        }
예제 #17
0
        // Attribute initialisation
        protected override Dictionary <ushort, ZclAttribute> InitializeAttributes()
        {
            Dictionary <ushort, ZclAttribute> attributeMap = new Dictionary <ushort, ZclAttribute>(7);

            ZclClusterType occupancysensing = ZclClusterType.GetValueById(ClusterType.OCCUPANCY_SENSING);

            attributeMap.Add(ATTR_OCCUPANCY, new ZclAttribute(occupancysensing, ATTR_OCCUPANCY, "Occupancy", ZclDataType.Get(DataType.BITMAP_8_BIT), true, true, false, true));
            attributeMap.Add(ATTR_OCCUPANCYSENSORTYPE, new ZclAttribute(occupancysensing, ATTR_OCCUPANCYSENSORTYPE, "OccupancySensorType", ZclDataType.Get(DataType.ENUMERATION_8_BIT), true, true, false, false));
            attributeMap.Add(ATTR_PIROCCUPIEDTOUNOCCUPIEDDELAY, new ZclAttribute(occupancysensing, ATTR_PIROCCUPIEDTOUNOCCUPIEDDELAY, "PIROccupiedToUnoccupiedDelay", ZclDataType.Get(DataType.UNSIGNED_8_BIT_INTEGER), false, true, true, false));
            attributeMap.Add(ATTR_PIRUNOCCUPIEDTOOCCUPIEDDELAY, new ZclAttribute(occupancysensing, ATTR_PIRUNOCCUPIEDTOOCCUPIEDDELAY, "PIRUnoccupiedToOccupiedDelay", ZclDataType.Get(DataType.UNSIGNED_8_BIT_INTEGER), false, true, true, false));
            attributeMap.Add(ATTR_ULTRASONICOCCUPIEDTOUNOCCUPIEDDELAY, new ZclAttribute(occupancysensing, ATTR_ULTRASONICOCCUPIEDTOUNOCCUPIEDDELAY, "UltraSonicOccupiedToUnoccupiedDelay", ZclDataType.Get(DataType.UNSIGNED_8_BIT_INTEGER), false, true, true, false));
            attributeMap.Add(ATTR_ULTRASONICUNOCCUPIEDTOOCCUPIEDDELAY, new ZclAttribute(occupancysensing, ATTR_ULTRASONICUNOCCUPIEDTOOCCUPIEDDELAY, "UltraSonicUnoccupiedToOccupiedDelay", ZclDataType.Get(DataType.UNSIGNED_8_BIT_INTEGER), false, true, true, false));
            attributeMap.Add(ATTR_ULTRASONICUNOCCUPIEDTOOCCUPIEDTHRESHOLD, new ZclAttribute(occupancysensing, ATTR_ULTRASONICUNOCCUPIEDTOOCCUPIEDTHRESHOLD, "UltrasonicUnoccupiedToOccupiedThreshold", ZclDataType.Get(DataType.UNSIGNED_8_BIT_INTEGER), false, true, true, false));

            return(attributeMap);
        }
예제 #18
0
        // Attribute initialisation
        protected override Dictionary <ushort, ZclAttribute> InitializeAttributes()
        {
            Dictionary <ushort, ZclAttribute> attributeMap = new Dictionary <ushort, ZclAttribute>(7);

            ZclClusterType pollControl = ZclClusterType.GetValueById(ClusterType.POLL_CONTROL);

            attributeMap.Add(ATTR_CHECKININTERVAL, new ZclAttribute(pollControl, ATTR_CHECKININTERVAL, "CheckinInterval", ZclDataType.Get(DataType.UNSIGNED_32_BIT_INTEGER), true, true, true, true));
            attributeMap.Add(ATTR_LONGPOLLINTERVAL, new ZclAttribute(pollControl, ATTR_LONGPOLLINTERVAL, "LongPollInterval", ZclDataType.Get(DataType.UNSIGNED_32_BIT_INTEGER), true, true, false, true));
            attributeMap.Add(ATTR_SHORTPOLLINTERVAL, new ZclAttribute(pollControl, ATTR_SHORTPOLLINTERVAL, "ShortPollInterval", ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER), true, true, false, true));
            attributeMap.Add(ATTR_FASTPOLLTIMEOUT, new ZclAttribute(pollControl, ATTR_FASTPOLLTIMEOUT, "FastPollTimeout", ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER), true, true, false, true));
            attributeMap.Add(ATTR_CHECKININTERVALMIN, new ZclAttribute(pollControl, ATTR_CHECKININTERVALMIN, "CheckinIntervalMin", ZclDataType.Get(DataType.UNSIGNED_32_BIT_INTEGER), false, true, false, false));
            attributeMap.Add(ATTR_LONGPOLLINTERVALMIN, new ZclAttribute(pollControl, ATTR_LONGPOLLINTERVALMIN, "LongPollIntervalMin", ZclDataType.Get(DataType.UNSIGNED_32_BIT_INTEGER), false, true, false, false));
            attributeMap.Add(ATTR_FASTPOLLTIMEOUTMIN, new ZclAttribute(pollControl, ATTR_FASTPOLLTIMEOUTMIN, "FastPollTimeoutMin", ZclDataType.Get(DataType.UNSIGNED_32_BIT_INTEGER), false, true, false, false));

            return(attributeMap);
        }
예제 #19
0
        // Attribute initialisation
        protected override Dictionary <ushort, ZclAttribute> InitializeAttributes()
        {
            Dictionary <ushort, ZclAttribute> attributeMap = new Dictionary <ushort, ZclAttribute>(7);

            ZclClusterType levelControl = ZclClusterType.GetValueById(ClusterType.LEVEL_CONTROL);

            attributeMap.Add(ATTR_CURRENTLEVEL, new ZclAttribute(levelControl, ATTR_CURRENTLEVEL, "CurrentLevel", ZclDataType.Get(DataType.UNSIGNED_8_BIT_INTEGER), true, true, false, true));
            attributeMap.Add(ATTR_REMAININGTIME, new ZclAttribute(levelControl, ATTR_REMAININGTIME, "RemainingTime", ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER), false, true, false, false));
            attributeMap.Add(ATTR_ONOFFTRANSITIONTIME, new ZclAttribute(levelControl, ATTR_ONOFFTRANSITIONTIME, "OnOffTransitionTime", ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER), false, true, true, false));
            attributeMap.Add(ATTR_ONLEVEL, new ZclAttribute(levelControl, ATTR_ONLEVEL, "OnLevel", ZclDataType.Get(DataType.UNSIGNED_8_BIT_INTEGER), false, true, true, false));
            attributeMap.Add(ATTR_ONTRANSITIONTIME, new ZclAttribute(levelControl, ATTR_ONTRANSITIONTIME, "OnTransitionTime", ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER), false, true, true, false));
            attributeMap.Add(ATTR_OFFTRANSITIONTIME, new ZclAttribute(levelControl, ATTR_OFFTRANSITIONTIME, "OffTransitionTime", ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER), false, true, true, false));
            attributeMap.Add(ATTR_DEFAULTMOVERATE, new ZclAttribute(levelControl, ATTR_DEFAULTMOVERATE, "DefaultMoveRate", ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER), false, true, true, false));

            return(attributeMap);
        }
예제 #20
0
        // Attribute initialisation
        protected override Dictionary <ushort, ZclAttribute> InitializeAttributes()
        {
            Dictionary <ushort, ZclAttribute> attributeMap = new Dictionary <ushort, ZclAttribute>(7);

            ZclClusterType iASZone = ZclClusterType.GetValueById(ClusterType.IAS_ZONE);

            attributeMap.Add(ATTR_ZONESTATE, new ZclAttribute(iASZone, ATTR_ZONESTATE, "ZoneState", ZclDataType.Get(DataType.ENUMERATION_8_BIT), true, true, false, false));
            attributeMap.Add(ATTR_ZONETYPE, new ZclAttribute(iASZone, ATTR_ZONETYPE, "ZoneType", ZclDataType.Get(DataType.ENUMERATION_16_BIT), true, true, false, false));
            attributeMap.Add(ATTR_ZONESTATUS, new ZclAttribute(iASZone, ATTR_ZONESTATUS, "ZoneStatus", ZclDataType.Get(DataType.BITMAP_16_BIT), true, true, false, false));
            attributeMap.Add(ATTR_IASCIEADDRESS, new ZclAttribute(iASZone, ATTR_IASCIEADDRESS, "IASCIEAddress", ZclDataType.Get(DataType.IEEE_ADDRESS), true, true, true, false));
            attributeMap.Add(ATTR_ZONEID, new ZclAttribute(iASZone, ATTR_ZONEID, "ZoneID", ZclDataType.Get(DataType.UNSIGNED_8_BIT_INTEGER), true, true, true, false));
            attributeMap.Add(ATTR_NUMBEROFZONESENSITIVITYLEVELSSUPPORTED, new ZclAttribute(iASZone, ATTR_NUMBEROFZONESENSITIVITYLEVELSSUPPORTED, "NumberOfZoneSensitivityLevelsSupported", ZclDataType.Get(DataType.UNSIGNED_8_BIT_INTEGER), false, true, false, false));
            attributeMap.Add(ATTR_CURRENTZONESENSITIVITYLEVEL, new ZclAttribute(iASZone, ATTR_CURRENTZONESENSITIVITYLEVEL, "CurrentZoneSensitivityLevel", ZclDataType.Get(DataType.UNSIGNED_8_BIT_INTEGER), false, true, true, false));

            return(attributeMap);
        }
예제 #21
0
        // Attribute initialisation
        protected override Dictionary <ushort, ZclAttribute> InitializeAttributes()
        {
            Dictionary <ushort, ZclAttribute> attributeMap = new Dictionary <ushort, ZclAttribute>(8);

            ZclClusterType time = ZclClusterType.GetValueById(ClusterType.TIME);

            attributeMap.Add(ATTR_TIME, new ZclAttribute(time, ATTR_TIME, "Time", ZclDataType.Get(DataType.UTCTIME), true, true, true, false));
            attributeMap.Add(ATTR_TIMESTATUS, new ZclAttribute(time, ATTR_TIMESTATUS, "TimeStatus", ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER), false, true, true, false));
            attributeMap.Add(ATTR_TIMEZONE, new ZclAttribute(time, ATTR_TIMEZONE, "TimeZone", ZclDataType.Get(DataType.SIGNED_32_BIT_INTEGER), false, true, true, false));
            attributeMap.Add(ATTR_DSTSTART, new ZclAttribute(time, ATTR_DSTSTART, "DstStart", ZclDataType.Get(DataType.UNSIGNED_32_BIT_INTEGER), false, true, true, false));
            attributeMap.Add(ATTR_DSTEND, new ZclAttribute(time, ATTR_DSTEND, "DstEnd", ZclDataType.Get(DataType.UNSIGNED_32_BIT_INTEGER), false, true, true, false));
            attributeMap.Add(ATTR_DSTSHIFT, new ZclAttribute(time, ATTR_DSTSHIFT, "DstShift", ZclDataType.Get(DataType.SIGNED_32_BIT_INTEGER), false, true, true, false));
            attributeMap.Add(ATTR_STANDARDTIME, new ZclAttribute(time, ATTR_STANDARDTIME, "StandardTime", ZclDataType.Get(DataType.SIGNED_32_BIT_INTEGER), false, true, false, false));
            attributeMap.Add(ATTR_LOCALTIME, new ZclAttribute(time, ATTR_LOCALTIME, "LocalTime", ZclDataType.Get(DataType.SIGNED_32_BIT_INTEGER), false, true, false, false));

            return(attributeMap);
        }
예제 #22
0
        // Attribute initialisation
        protected override Dictionary <ushort, ZclAttribute> InitializeAttributes()
        {
            Dictionary <ushort, ZclAttribute> attributeMap = new Dictionary <ushort, ZclAttribute>(8);

            ZclClusterType multistateInputBasic = ZclClusterType.GetValueById(ClusterType.MULTISTATE_INPUT__BASIC);

            attributeMap.Add(ATTR_STATETEXT, new ZclAttribute(multistateInputBasic, ATTR_STATETEXT, "StateText", ZclDataType.Get(DataType.CHARACTER_STRING), false, true, true, false));
            attributeMap.Add(ATTR_DESCRIPTION, new ZclAttribute(multistateInputBasic, ATTR_DESCRIPTION, "Description", ZclDataType.Get(DataType.CHARACTER_STRING), false, true, true, false));
            attributeMap.Add(ATTR_NUMBEROFSTATES, new ZclAttribute(multistateInputBasic, ATTR_NUMBEROFSTATES, "NumberOfStates", ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER), true, true, true, false));
            attributeMap.Add(ATTR_OUTOFSERVICE, new ZclAttribute(multistateInputBasic, ATTR_OUTOFSERVICE, "OutOfService", ZclDataType.Get(DataType.BOOLEAN), true, true, true, false));
            attributeMap.Add(ATTR_PRESENTVALUE, new ZclAttribute(multistateInputBasic, ATTR_PRESENTVALUE, "PresentValue", ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER), true, true, true, false));
            attributeMap.Add(ATTR_RELIABILITY, new ZclAttribute(multistateInputBasic, ATTR_RELIABILITY, "Reliability", ZclDataType.Get(DataType.ENUMERATION_8_BIT), false, true, true, false));
            attributeMap.Add(ATTR_STATUSFLAGS, new ZclAttribute(multistateInputBasic, ATTR_STATUSFLAGS, "StatusFlags", ZclDataType.Get(DataType.BITMAP_8_BIT), true, true, false, false));
            attributeMap.Add(ATTR_APPLICATIONTYPE, new ZclAttribute(multistateInputBasic, ATTR_APPLICATIONTYPE, "ApplicationType", ZclDataType.Get(DataType.SIGNED_32_BIT_INTEGER), false, true, false, false));

            return(attributeMap);
        }
        // Attribute initialisation
        protected override Dictionary <ushort, ZclAttribute> InitializeAttributes()
        {
            Dictionary <ushort, ZclAttribute> attributeMap = new Dictionary <ushort, ZclAttribute>(9);

            ZclClusterType pressuremeasurement = ZclClusterType.GetValueById(ClusterType.PRESSURE_MEASUREMENT);

            attributeMap.Add(ATTR_MEASUREDVALUE, new ZclAttribute(pressuremeasurement, ATTR_MEASUREDVALUE, "MeasuredValue", ZclDataType.Get(DataType.SIGNED_16_BIT_INTEGER), true, true, false, true));
            attributeMap.Add(ATTR_MINMEASUREDVALUE, new ZclAttribute(pressuremeasurement, ATTR_MINMEASUREDVALUE, "MinMeasuredValue", ZclDataType.Get(DataType.SIGNED_16_BIT_INTEGER), true, true, false, false));
            attributeMap.Add(ATTR_MAXMEASUREDVALUE, new ZclAttribute(pressuremeasurement, ATTR_MAXMEASUREDVALUE, "MaxMeasuredValue", ZclDataType.Get(DataType.SIGNED_16_BIT_INTEGER), true, true, false, true));
            attributeMap.Add(ATTR_TOLERANCE, new ZclAttribute(pressuremeasurement, ATTR_TOLERANCE, "Tolerance", ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER), false, true, false, false));
            attributeMap.Add(ATTR_SCALEDVALUE, new ZclAttribute(pressuremeasurement, ATTR_SCALEDVALUE, "ScaledValue", ZclDataType.Get(DataType.SIGNED_16_BIT_INTEGER), false, true, false, true));
            attributeMap.Add(ATTR_MINSCALEDVALUE, new ZclAttribute(pressuremeasurement, ATTR_MINSCALEDVALUE, "MinScaledValue", ZclDataType.Get(DataType.SIGNED_16_BIT_INTEGER), false, true, false, false));
            attributeMap.Add(ATTR_MAXSCALEDVALUE, new ZclAttribute(pressuremeasurement, ATTR_MAXSCALEDVALUE, "MaxScaledValue", ZclDataType.Get(DataType.SIGNED_16_BIT_INTEGER), false, true, false, false));
            attributeMap.Add(ATTR_SCALEDTOLERANCE, new ZclAttribute(pressuremeasurement, ATTR_SCALEDTOLERANCE, "ScaledTolerance", ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER), false, true, false, true));
            attributeMap.Add(ATTR_SCALE, new ZclAttribute(pressuremeasurement, ATTR_SCALE, "Scale", ZclDataType.Get(DataType.UNSIGNED_8_BIT_INTEGER), false, true, false, false));

            return(attributeMap);
        }
예제 #24
0
        public ZclCluster GetClusterClass(ushort clusterId)
        {
            ZclClusterType clusterType = ZclClusterType.GetValueById(clusterId);

            if (clusterType == null)
            {
                // Unsupported cluster
                Log.Debug("{Endpoint}: Unsupported cluster {Cluster}", GetEndpointAddress(), clusterId);
                return(null);
            }

            // Create a cluster class
            //if (clusterType.ClusterClass != null)
            //    return (ZclCluster)Activator.CreateInstance(clusterType.ClusterClass, this);
            //else
            //    return null;

            return(clusterType.ClusterFactory(this));
        }
예제 #25
0
        public ZclCluster GetClusterClass(ushort clusterId)
        {
            ZclClusterType clusterType = ZclClusterType.GetValueById(clusterId);

            if (clusterType == null)
            {
                // Unsupported cluster
                _logger.Debug("{Endpoint}: Unsupported cluster {Cluster}", GetEndpointAddress(), clusterId);
                return(null);
            }

            // Create a cluster class
            if (clusterType.ClusterClass != null)
            {
                return((ZclCluster)Activator.CreateInstance(clusterType.ClusterClass, this));
            }
            else
            {
                return(null);
            }
        }
예제 #26
0
        // Attribute initialisation
        protected override Dictionary <ushort, ZclAttribute> InitializeAttributes()
        {
            Dictionary <ushort, ZclAttribute> attributeMap = new Dictionary <ushort, ZclAttribute>(13);

            ZclClusterType rSSILocation = ZclClusterType.GetValueById(ClusterType.RSSI_LOCATION);

            attributeMap.Add(ATTR_LOCATIONTYPE, new ZclAttribute(rSSILocation, ATTR_LOCATIONTYPE, "LocationType", ZclDataType.Get(DataType.DATA_8_BIT), true, true, false, false));
            attributeMap.Add(ATTR_LOCATIONMETHOD, new ZclAttribute(rSSILocation, ATTR_LOCATIONMETHOD, "LocationMethod", ZclDataType.Get(DataType.ENUMERATION_8_BIT), true, true, false, false));
            attributeMap.Add(ATTR_LOCATIONAGE, new ZclAttribute(rSSILocation, ATTR_LOCATIONAGE, "LocationAge", ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER), false, true, false, false));
            attributeMap.Add(ATTR_QUALITYMEASURE, new ZclAttribute(rSSILocation, ATTR_QUALITYMEASURE, "QualityMeasure", ZclDataType.Get(DataType.UNSIGNED_8_BIT_INTEGER), false, true, false, false));
            attributeMap.Add(ATTR_NUMBEROFDEVICES, new ZclAttribute(rSSILocation, ATTR_NUMBEROFDEVICES, "NumberOfDevices", ZclDataType.Get(DataType.UNSIGNED_8_BIT_INTEGER), false, true, false, false));
            attributeMap.Add(ATTR_COORDINATE1, new ZclAttribute(rSSILocation, ATTR_COORDINATE1, "Coordinate1", ZclDataType.Get(DataType.SIGNED_16_BIT_INTEGER), true, true, true, false));
            attributeMap.Add(ATTR_COORDINATE2, new ZclAttribute(rSSILocation, ATTR_COORDINATE2, "Coordinate2", ZclDataType.Get(DataType.SIGNED_16_BIT_INTEGER), true, true, true, false));
            attributeMap.Add(ATTR_COORDINATE3, new ZclAttribute(rSSILocation, ATTR_COORDINATE3, "Coordinate3", ZclDataType.Get(DataType.SIGNED_16_BIT_INTEGER), false, true, true, false));
            attributeMap.Add(ATTR_POWER, new ZclAttribute(rSSILocation, ATTR_POWER, "Power", ZclDataType.Get(DataType.SIGNED_16_BIT_INTEGER), true, true, true, false));
            attributeMap.Add(ATTR_PATHLOSSEXPONENT, new ZclAttribute(rSSILocation, ATTR_PATHLOSSEXPONENT, "PathLossExponent", ZclDataType.Get(DataType.SIGNED_16_BIT_INTEGER), true, true, true, false));
            attributeMap.Add(ATTR_REPORTINGPERIOD, new ZclAttribute(rSSILocation, ATTR_REPORTINGPERIOD, "ReportingPeriod", ZclDataType.Get(DataType.SIGNED_16_BIT_INTEGER), false, true, true, false));
            attributeMap.Add(ATTR_CALCULATIONPERIOD, new ZclAttribute(rSSILocation, ATTR_CALCULATIONPERIOD, "CalculationPeriod", ZclDataType.Get(DataType.SIGNED_16_BIT_INTEGER), false, true, true, false));
            attributeMap.Add(ATTR_NUMBERRSSIMEASUREMENTS, new ZclAttribute(rSSILocation, ATTR_NUMBERRSSIMEASUREMENTS, "NumberRSSIMeasurements", ZclDataType.Get(DataType.SIGNED_16_BIT_INTEGER), false, true, true, false));

            return(attributeMap);
        }
예제 #27
0
        // Attribute initialisation
        protected override Dictionary <ushort, ZclAttribute> InitializeAttributes()
        {
            Dictionary <ushort, ZclAttribute> attributeMap = new Dictionary <ushort, ZclAttribute>(30);

            ZclClusterType diagnostics = ZclClusterType.GetValueById(ClusterType.DIAGNOSTICS);

            attributeMap.Add(ATTR_MACRXBCAST, new ZclAttribute(diagnostics, ATTR_MACRXBCAST, "MacRxBcast", ZclDataType.Get(DataType.UNSIGNED_32_BIT_INTEGER), true, true, false, false));
            attributeMap.Add(ATTR_MACTXBCAST, new ZclAttribute(diagnostics, ATTR_MACTXBCAST, "MacTxBcast", ZclDataType.Get(DataType.UNSIGNED_32_BIT_INTEGER), true, true, false, false));
            attributeMap.Add(ATTR_MACRXUCAST, new ZclAttribute(diagnostics, ATTR_MACRXUCAST, "MacRxUcast", ZclDataType.Get(DataType.UNSIGNED_32_BIT_INTEGER), true, true, false, false));
            attributeMap.Add(ATTR_MACTXUCAST, new ZclAttribute(diagnostics, ATTR_MACTXUCAST, "MacTxUcast", ZclDataType.Get(DataType.UNSIGNED_32_BIT_INTEGER), true, true, false, false));
            attributeMap.Add(ATTR_MACTXUCASTRETRY, new ZclAttribute(diagnostics, ATTR_MACTXUCASTRETRY, "MacTxUcastRetry", ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER), true, true, false, false));
            attributeMap.Add(ATTR_MACTXUCASTFAIL, new ZclAttribute(diagnostics, ATTR_MACTXUCASTFAIL, "MacTxUcastFail", ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER), true, true, false, false));
            attributeMap.Add(ATTR_APSRXBCAST, new ZclAttribute(diagnostics, ATTR_APSRXBCAST, "APSRxBcast", ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER), true, true, false, false));
            attributeMap.Add(ATTR_APSTXBCAST, new ZclAttribute(diagnostics, ATTR_APSTXBCAST, "APSTxBcast", ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER), true, true, false, false));
            attributeMap.Add(ATTR_APSRXUCAST, new ZclAttribute(diagnostics, ATTR_APSRXUCAST, "APSRxUcast", ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER), true, true, false, false));
            attributeMap.Add(ATTR_APSTXUCASTSUCCESS, new ZclAttribute(diagnostics, ATTR_APSTXUCASTSUCCESS, "APSTxUcastSuccess", ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER), true, true, false, false));
            attributeMap.Add(ATTR_APSTXUCASTRETRY, new ZclAttribute(diagnostics, ATTR_APSTXUCASTRETRY, "APSTxUcastRetry", ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER), true, true, false, false));
            attributeMap.Add(ATTR_APSTXUCASTFAIL, new ZclAttribute(diagnostics, ATTR_APSTXUCASTFAIL, "APSTxUcastFail", ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER), true, true, false, false));
            attributeMap.Add(ATTR_ROUTEDISCINITIATED, new ZclAttribute(diagnostics, ATTR_ROUTEDISCINITIATED, "RouteDiscInitiated", ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER), true, true, false, false));
            attributeMap.Add(ATTR_NEIGHBORADDED, new ZclAttribute(diagnostics, ATTR_NEIGHBORADDED, "NeighborAdded", ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER), true, true, false, false));
            attributeMap.Add(ATTR_NEIGHBORREMOVED, new ZclAttribute(diagnostics, ATTR_NEIGHBORREMOVED, "NeighborRemoved", ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER), true, true, false, false));
            attributeMap.Add(ATTR_NEIGHBORSTALE, new ZclAttribute(diagnostics, ATTR_NEIGHBORSTALE, "NeighborStale", ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER), true, true, false, false));
            attributeMap.Add(ATTR_JOININDICATION, new ZclAttribute(diagnostics, ATTR_JOININDICATION, "JoinIndication", ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER), true, true, false, false));
            attributeMap.Add(ATTR_CHILDMOVED, new ZclAttribute(diagnostics, ATTR_CHILDMOVED, "ChildMoved", ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER), true, true, false, false));
            attributeMap.Add(ATTR_NWKFCFAILURE, new ZclAttribute(diagnostics, ATTR_NWKFCFAILURE, "NWKFCFailure", ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER), true, true, false, false));
            attributeMap.Add(ATTR_APSFCFAILURE, new ZclAttribute(diagnostics, ATTR_APSFCFAILURE, "APSFCFailure", ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER), true, true, false, false));
            attributeMap.Add(ATTR_APSUNAUTHORIZEDKEY, new ZclAttribute(diagnostics, ATTR_APSUNAUTHORIZEDKEY, "APSUnauthorizedKey", ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER), true, true, false, false));
            attributeMap.Add(ATTR_NWKDECRYPTFAILURES, new ZclAttribute(diagnostics, ATTR_NWKDECRYPTFAILURES, "NWKDecryptFailures", ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER), true, true, false, false));
            attributeMap.Add(ATTR_APSDECRYPTFAILURES, new ZclAttribute(diagnostics, ATTR_APSDECRYPTFAILURES, "APSDecryptFailures", ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER), true, true, false, false));
            attributeMap.Add(ATTR_PACKETBUFFERALLOCATEFAILURES, new ZclAttribute(diagnostics, ATTR_PACKETBUFFERALLOCATEFAILURES, "PacketBufferAllocateFailures", ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER), true, true, false, false));
            attributeMap.Add(ATTR_RELAYEDUCAST, new ZclAttribute(diagnostics, ATTR_RELAYEDUCAST, "RelayedUcast", ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER), true, true, false, false));
            attributeMap.Add(ATTR_PHYTOMACQUEUELIMITREACHED, new ZclAttribute(diagnostics, ATTR_PHYTOMACQUEUELIMITREACHED, "PhytoMACqueuelimitreached", ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER), true, true, false, false));
            attributeMap.Add(ATTR_PACKETVALIDATEDROPCOUNT, new ZclAttribute(diagnostics, ATTR_PACKETVALIDATEDROPCOUNT, "PacketValidatedropcount", ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER), true, true, false, false));
            attributeMap.Add(ATTR_AVERAGEMACRETRYPERAPSMESSAGESENT, new ZclAttribute(diagnostics, ATTR_AVERAGEMACRETRYPERAPSMESSAGESENT, "AverageMACRetryPerAPSMessageSent", ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER), true, true, false, false));
            attributeMap.Add(ATTR_LASTMESSAGELQI, new ZclAttribute(diagnostics, ATTR_LASTMESSAGELQI, "LastMessageLQI", ZclDataType.Get(DataType.UNSIGNED_8_BIT_INTEGER), true, true, false, false));
            attributeMap.Add(ATTR_LASTMESSAGERSSI, new ZclAttribute(diagnostics, ATTR_LASTMESSAGERSSI, "LastMessageRSSI", ZclDataType.Get(DataType.SIGNED_8_BIT_INTEGER), true, true, false, false));

            return(attributeMap);
        }
예제 #28
0
        // Attribute initialisation
        protected override Dictionary <ushort, ZclAttribute> InitializeAttributes()
        {
            Dictionary <ushort, ZclAttribute> attributeMap = new Dictionary <ushort, ZclAttribute>(14);

            ZclClusterType electricalMeasurement = ZclClusterType.GetValueById(ClusterType.ELECTRICAL_MEASUREMENT);

            attributeMap.Add(ATTR_MEASUREMENTTYPE, new ZclAttribute(electricalMeasurement, ATTR_MEASUREMENTTYPE, "MeasurementType", ZclDataType.Get(DataType.BITMAP_32_BIT), true, true, false, false));
            attributeMap.Add(ATTR_ACFREQUENCY, new ZclAttribute(electricalMeasurement, ATTR_ACFREQUENCY, "ACFrequency", ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER), false, true, false, false));
            attributeMap.Add(ATTR_TOTALACTIVEPOWER, new ZclAttribute(electricalMeasurement, ATTR_TOTALACTIVEPOWER, "TotalActivePower", ZclDataType.Get(DataType.SIGNED_32_BIT_INTEGER), false, true, false, false));
            attributeMap.Add(ATTR_TOTALREACTIVEPOWER, new ZclAttribute(electricalMeasurement, ATTR_TOTALREACTIVEPOWER, "TotalReactivePower", ZclDataType.Get(DataType.SIGNED_32_BIT_INTEGER), false, true, false, false));
            attributeMap.Add(ATTR_TOTALAPPARENTPOWER, new ZclAttribute(electricalMeasurement, ATTR_TOTALAPPARENTPOWER, "TotalApparentPower", ZclDataType.Get(DataType.UNSIGNED_32_BIT_INTEGER), false, true, false, false));
            attributeMap.Add(ATTR_RMSVOLTAGE, new ZclAttribute(electricalMeasurement, ATTR_RMSVOLTAGE, "RMSVoltage", ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER), false, true, false, false));
            attributeMap.Add(ATTR_RMSCURRENT, new ZclAttribute(electricalMeasurement, ATTR_RMSCURRENT, "RMSCurrent", ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER), false, true, false, false));
            attributeMap.Add(ATTR_ACTIVEPOWER, new ZclAttribute(electricalMeasurement, ATTR_ACTIVEPOWER, "ActivePower", ZclDataType.Get(DataType.SIGNED_16_BIT_INTEGER), false, true, false, false));
            attributeMap.Add(ATTR_ACVOLTAGEMULTIPLIER, new ZclAttribute(electricalMeasurement, ATTR_ACVOLTAGEMULTIPLIER, "ACVoltageMultiplier", ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER), false, true, false, false));
            attributeMap.Add(ATTR_ACVOLTAGEDIVISOR, new ZclAttribute(electricalMeasurement, ATTR_ACVOLTAGEDIVISOR, "ACVoltageDivisor", ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER), false, true, false, false));
            attributeMap.Add(ATTR_ACCURRENTMULTIPLIER, new ZclAttribute(electricalMeasurement, ATTR_ACCURRENTMULTIPLIER, "ACCurrentMultiplier", ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER), false, true, false, false));
            attributeMap.Add(ATTR_ACCURRENTDIVISOR, new ZclAttribute(electricalMeasurement, ATTR_ACCURRENTDIVISOR, "ACCurrentDivisor", ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER), false, true, false, false));
            attributeMap.Add(ATTR_ACPOWERMULTIPLIER, new ZclAttribute(electricalMeasurement, ATTR_ACPOWERMULTIPLIER, "ACPowerMultiplier", ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER), false, true, false, false));
            attributeMap.Add(ATTR_ACPOWERDIVISOR, new ZclAttribute(electricalMeasurement, ATTR_ACPOWERDIVISOR, "ACPowerDivisor", ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER), false, true, false, false));

            return(attributeMap);
        }
예제 #29
0
        // Attribute initialisation
        protected override Dictionary <ushort, ZclAttribute> InitializeAttributes()
        {
            Dictionary <ushort, ZclAttribute> attributeMap = new Dictionary <ushort, ZclAttribute>(14);

            ZclClusterType basic = ZclClusterType.GetValueById(ClusterType.BASIC);

            attributeMap.Add(ATTR_ZCLVERSION, new ZclAttribute(basic, ATTR_ZCLVERSION, "ZCLVersion", ZclDataType.Get(DataType.UNSIGNED_8_BIT_INTEGER), true, true, false, false));
            attributeMap.Add(ATTR_APPLICATIONVERSION, new ZclAttribute(basic, ATTR_APPLICATIONVERSION, "ApplicationVersion", ZclDataType.Get(DataType.UNSIGNED_8_BIT_INTEGER), true, true, false, false));
            attributeMap.Add(ATTR_STACKVERSION, new ZclAttribute(basic, ATTR_STACKVERSION, "StackVersion", ZclDataType.Get(DataType.UNSIGNED_8_BIT_INTEGER), true, true, false, false));
            attributeMap.Add(ATTR_HWVERSION, new ZclAttribute(basic, ATTR_HWVERSION, "HWVersion", ZclDataType.Get(DataType.UNSIGNED_8_BIT_INTEGER), true, true, false, false));
            attributeMap.Add(ATTR_MANUFACTURERNAME, new ZclAttribute(basic, ATTR_MANUFACTURERNAME, "ManufacturerName", ZclDataType.Get(DataType.CHARACTER_STRING), true, true, false, false));
            attributeMap.Add(ATTR_MODELIDENTIFIER, new ZclAttribute(basic, ATTR_MODELIDENTIFIER, "ModelIdentifier", ZclDataType.Get(DataType.CHARACTER_STRING), true, true, false, false));
            attributeMap.Add(ATTR_DATECODE, new ZclAttribute(basic, ATTR_DATECODE, "DateCode", ZclDataType.Get(DataType.CHARACTER_STRING), true, true, false, false));
            attributeMap.Add(ATTR_POWERSOURCE, new ZclAttribute(basic, ATTR_POWERSOURCE, "PowerSource", ZclDataType.Get(DataType.ENUMERATION_8_BIT), true, true, false, false));
            attributeMap.Add(ATTR_LOCATIONDESCRIPTION, new ZclAttribute(basic, ATTR_LOCATIONDESCRIPTION, "LocationDescription", ZclDataType.Get(DataType.CHARACTER_STRING), true, true, true, false));
            attributeMap.Add(ATTR_PHYSICALENVIRONMENT, new ZclAttribute(basic, ATTR_PHYSICALENVIRONMENT, "PhysicalEnvironment", ZclDataType.Get(DataType.ENUMERATION_8_BIT), true, true, true, false));
            attributeMap.Add(ATTR_DEVICEENABLED, new ZclAttribute(basic, ATTR_DEVICEENABLED, "DeviceEnabled", ZclDataType.Get(DataType.BOOLEAN), true, true, true, false));
            attributeMap.Add(ATTR_ALARMMASK, new ZclAttribute(basic, ATTR_ALARMMASK, "AlarmMask", ZclDataType.Get(DataType.BITMAP_8_BIT), true, true, true, false));
            attributeMap.Add(ATTR_DISABLELOCALCONFIG, new ZclAttribute(basic, ATTR_DISABLELOCALCONFIG, "DisableLocalConfig", ZclDataType.Get(DataType.BITMAP_8_BIT), true, true, true, false));
            attributeMap.Add(ATTR_SWBUILDID, new ZclAttribute(basic, ATTR_SWBUILDID, "SWBuildID", ZclDataType.Get(DataType.CHARACTER_STRING), false, true, false, false));

            return(attributeMap);
        }
예제 #30
0
        private void UpdateClusters(ConcurrentDictionary <int, ZclCluster> clusters, List <ushort> newList, bool isInput)
        {
            // Get a list any clusters that are no longer in the list
            List <int> removeIds = new List <int>();

            foreach (ZclCluster cluster in clusters.Values)
            {
                if (newList.Contains(cluster.GetClusterId()))
                {
                    // The existing cluster is in the new list, so no need to remove it
                    continue;
                }

                removeIds.Add(cluster.GetClusterId());
            }

            // Remove clusters no longer in use
            foreach (int id in removeIds)
            {
                Log.Debug("{Endpoint}: Removing cluster {Cluster}", GetEndpointAddress(), id);
                clusters.TryRemove(id, out ZclCluster not_used);
            }

            // Add any missing clusters into the list
            foreach (ushort id in newList)
            {
                if (!clusters.ContainsKey(id))
                {
                    // Get the cluster type
                    ZclCluster clusterClass = GetClusterClass(id);
                    if (clusterClass == null)
                    {
                        continue;
                    }

                    if (isInput)
                    {
                        Log.Debug("{EndpointAddress}: Setting cluster {Cluster} as server", GetEndpointAddress(), ZclClusterType.GetValueById(id));
                        clusterClass.SetServer();
                    }
                    else
                    {
                        Log.Debug("{EndpointAddress}: Setting cluster {Cluster} as client", GetEndpointAddress(), ZclClusterType.GetValueById(id));
                        clusterClass.SetClient();
                    }

                    // Add to our list of clusters
                    clusters.TryAdd(id, clusterClass);
                }
            }
        }