Example #1
0
 internal void AddInParam(ZclValue parameter)
 {
     // add parameter in both list: "internal" ZCL list as well "BridgeRT" list
     // note that reason for 2 list is explained above
     m_zclInParamList.Add(parameter);
     InputParams.Add(parameter);
 }
Example #2
0
        internal ZclAttribute(ZclCluster cluster, UInt16 id, String name, byte zigBeeType, bool isReadOnly = false, bool isOptional = false, bool isReportable = false)
        {
            // save parent cluster
            m_cluster = cluster;

            // attribute specific
            m_Id         = id;
            m_isReadOnly = isReadOnly;
            m_isOptional = isOptional;
            m_zigBeeType = zigBeeType;

            // ZigBee command specific
            m_isZdoCommand = false;
            int offset = ZclHelper.GetCommandIdOffset(ref m_zclHeader, 0);

            m_zclHeader[offset] = COMMAND_ID_READ_ATTRIBUTE;

            // BridgeRT specific
            Value       = new ZclValue(zigBeeType, name);
            Annotations = new Dictionary <string, string>();
            if (isReadOnly)
            {
                Access = E_ACCESS_TYPE.ACCESS_READ;
            }
            else
            {
                Access = E_ACCESS_TYPE.ACCESS_READWRITE;
            }
            if (isReportable)
            {
                COVBehavior = SignalBehavior.Always;
            }
            else
            {
                COVBehavior = SignalBehavior.Unspecified;
            }
        }
Example #3
0
        internal LevelControlCluster(ZigBeeEndPoint endPoint, List <UInt16> supportedAttributes)
            : base(endPoint)
        {
            // set cluster name and cluster Id
            Name = CLUSTER_NAME;
            m_Id = CLUSTER_ID;

            // if supportedAttributes is null assume all attributes supported
            bool supportAllAttributesBydefault = false;

            if (supportedAttributes == null)
            {
                supportAllAttributesBydefault = true;
            }
            // current level attribute (read only)
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_CURRENTLEVEL))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_CURRENTLEVEL, "CurrentLevel", ZclHelper.UINT8_TYPE, true, false);
                m_attributeList.Add(attrib.Id, attrib);
            }
            // remaining time attribute (read only)
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_REMAININGTIME))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_REMAININGTIME, "RemainingTime", ZclHelper.UINT16_TYPE, true, true);
                m_attributeList.Add(attrib.Id, attrib);
            }
            // on/off transition time attribute (read/write)
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_ONOFFTRANSITIONTIME))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_ONOFFTRANSITIONTIME, "OnOffTransitionTime", ZclHelper.UINT16_TYPE, false, true);
                m_attributeList.Add(attrib.Id, attrib);
            }
            // on level attribute (read/write)
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_ONLEVEL))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_ONLEVEL, "OnLevel", ZclHelper.UINT8_TYPE, false, true);
                m_attributeList.Add(attrib.Id, attrib);
            }

            // IMPORTANT NOTE,  parameters MUST be added in parameter list of each command
            // in the order specified in ZCL standard

            // move to level command (no response required)
            var command   = new ZclCommand(this, COMMAND_MOVETOLEVEL, "MoveToLevel", false);
            var parameter = new ZclValue(ZclHelper.UINT8_TYPE, LEVEL_PARAM);

            command.AddInParam(parameter);
            parameter = new ZclValue(ZclHelper.UINT16_TYPE, "TransitionTime");
            command.AddInParam(parameter);
            m_commandList.Add(command.Id, command);

            // Move command (no response required)
            command   = new ZclCommand(this, COMMAND_MOVE, "Move", false);
            parameter = new ZclValue(ZclHelper.ENUMERATION_8_BIT_TYPE, "MoveMode");
            command.AddInParam(parameter);
            parameter = new ZclValue(ZclHelper.UINT8_TYPE, "Rate");
            command.AddInParam(parameter);
            m_commandList.Add(command.Id, command);

            // Step command (no response required)
            command   = new ZclCommand(this, COMMAND_STEP, "Step", false);
            parameter = new ZclValue(ZclHelper.ENUMERATION_8_BIT_TYPE, "StepMode");
            command.AddInParam(parameter);
            parameter = new ZclValue(ZclHelper.UINT8_TYPE, "StepSize");
            command.AddInParam(parameter);
            parameter = new ZclValue(ZclHelper.UINT16_TYPE, "TransitionTime");
            command.AddInParam(parameter);
            m_commandList.Add(command.Id, command);

            // Stop command (no response required)
            command = new ZclCommand(this, COMMAND_STOP, "Stop", false);
            m_commandList.Add(command.Id, command);

            // move to level with on/off command (no response required)
            command   = new ZclCommand(this, COMMAND_MOVETOLEVEL_WITHONOFF, "MoveToLevelWithOnOff", false);
            parameter = new ZclValue(ZclHelper.UINT8_TYPE, LEVEL_PARAM);
            command.AddInParam(parameter);
            parameter = new ZclValue(ZclHelper.UINT16_TYPE, "TransitionTime");
            command.AddInParam(parameter);
            m_commandList.Add(command.Id, command);

            // Move command (no response required)
            command   = new ZclCommand(this, COMMAND_MOVE_WITHONOFF, "MoveWithOnOff", false);
            parameter = new ZclValue(ZclHelper.ENUMERATION_8_BIT_TYPE, "MoveMode");
            command.AddInParam(parameter);
            parameter = new ZclValue(ZclHelper.UINT8_TYPE, "Rate");
            command.AddInParam(parameter);
            m_commandList.Add(command.Id, command);

            // Step command (no response required)
            command   = new ZclCommand(this, COMMAND_STEP_WITHONOFF, "StepWithOnOff", false);
            parameter = new ZclValue(ZclHelper.ENUMERATION_8_BIT_TYPE, "StepMode");
            command.AddInParam(parameter);
            parameter = new ZclValue(ZclHelper.UINT8_TYPE, "StepSize");
            command.AddInParam(parameter);
            parameter = new ZclValue(ZclHelper.UINT16_TYPE, "TransitionTime");
            command.AddInParam(parameter);
            m_commandList.Add(command.Id, command);

            // Stop command (no response required)
            command = new ZclCommand(this, COMMAND_STOP_WITHONOFF, "StopWithOnOff", false);
            m_commandList.Add(command.Id, command);

            // call parent class "post constructor"
            PostChildClassConstructor();
        }
Example #4
0
        internal IASZoneCluster(ZigBeeEndPoint endPoint, List <UInt16> supportedAttributes)
            : base(endPoint)
        {
            // set cluster name and cluster Id
            Name = CLUSTER_NAME;
            m_Id = CLUSTER_ID;

            // if supportedAttributes is null assume all attributes supported
            bool supportAllAttributesBydefault = false;

            if (supportedAttributes == null)
            {
                supportAllAttributesBydefault = true;
            }

            // Zone State attribute (read only)
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_ZONESTATE))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_ZONESTATE, "ZoneState", ZclHelper.ENUMERATION_8_BIT_TYPE, true);
                m_attributeList.Add(attrib.Id, attrib);
            }

            // Zone Type attribute (read only)
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_ZONETYPE))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_ZONETYPE, "ZoneType", ZclHelper.ENUMERATION_16_BIT_TYPE, true);
                m_attributeList.Add(attrib.Id, attrib);
            }

            // Zone Status attribute (read only, mandatory and "reportable")
            // note that ZCL standard indicates that this attribute isn't reportable, however it also specifies a server command: Zone status change notification command to
            // notify change of zone status => ZclAttribute is then kind of reportable through a server command mechanism (change of value signal should consequently be available
            // for that attribute)
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_ZONESTATUS))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_ZONESTATUS, "ZoneStatus", ZclHelper.BITMAP_16_BIT_TYPE, true, false, true);
                m_attributeList.Add(attrib.Id, attrib);
            }

            // IAS CIE address attribute (read/write)
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_IASCIEADDRESS))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_IASCIEADDRESS, "IasCieAddress", ZclHelper.IEEE_ADDRESS_TYPE, false);
                m_attributeList.Add(attrib.Id, attrib);
            }

            // IMPORTANT NOTE,  parameters MUST be added in parameter list of each command
            // in the order specified in ZCL standard

            // Zone status change notification command
            // note that this command is server command hence received by ZigBee DSB (as opposed to ZclCommand which are sent by ZigBee DSB)
            var command   = new ZclServerCommand(this, COMMAND_ZONESTATUSCHANGENOTIFICATION);
            var parameter = new ZclValue(ZclHelper.ENUMERATION_16_BIT_TYPE, PARAM_ZONESTATUS);

            command.AddParam(parameter);
            parameter = new ZclValue(ZclHelper.ENUMERATION_8_BIT_TYPE, PARAM_EXTENDEDSTATUS);
            command.AddParam(parameter);
            command.OnReception += ZoneStatusChangeNotification;
            m_serverCommandList.Add(command);

            // call parent class "post constructor"
            PostChildClassConstructor();
        }
Example #5
0
 internal void AddOutParam(ZclValue parameter)
 {
     OutputParams.Add(parameter);
 }
Example #6
0
 public void AddParam(ZclValue parameter)
 {
     m_paramList.Add(parameter);
 }
Example #7
0
        internal OnOffCluster(ZigBeeEndPoint endPoint, List <UInt16> supportedAttributes)
            : base(endPoint)
        {
            // set cluster name and cluster Id
            Name = CLUSTER_NAME;
            m_Id = CLUSTER_ID;

            // if supportedAttributes is null assume all attributes supported
            bool supportAllAttributesBydefault = false;

            if (supportedAttributes == null)
            {
                supportAllAttributesBydefault = true;
            }

            // OnOff attribute (read only)
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_ONOFF))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_ONOFF, "OnOff", ZclHelper.BOOLEAN_TYPE, true, false);
                m_attributeList.Add(attrib.Id, attrib);
            }

            // IMPORTANT NOTE,  parameters MUST be added in parameter list of each command
            // in the order specified in ZCL standard

            // Off command (no response required)
            var command = new ZclCommand(this, COMMAND_OFF, "Off", false);

            m_commandList.Add(command.Id, command);
            // On command (no response required)
            command = new ZclCommand(this, COMMAND_ON, "On", false);
            m_commandList.Add(command.Id, command);
            // Toggle command (no response required)
            command = new ZclCommand(this, COMMAND_TOGGLE, "Toggle", false);
            m_commandList.Add(command.Id, command);

            // add ZLL profile specific attributes and commands
            bool areZllAttributesSupported = false;

            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_GLOBALSCENECONTROL_ZLL))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_GLOBALSCENECONTROL_ZLL, "GlobalSceneControl", ZclHelper.BOOLEAN_TYPE, true, false);
                m_attributeList.Add(attrib.Id, attrib);
                areZllAttributesSupported = true;
            }
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_ONTIME_ZLL))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_ONTIME_ZLL, "OnTime", ZclHelper.UINT16_TYPE, true, false);
                m_attributeList.Add(attrib.Id, attrib);
                areZllAttributesSupported = true;
            }
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_OFFWAITTIME_ZLL))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_OFFWAITTIME_ZLL, "OnWaitTime", ZclHelper.UINT16_TYPE, true, false);
                m_attributeList.Add(attrib.Id, attrib);
                areZllAttributesSupported = true;
            }

            // add ZLL command if ZLL attributes are supported
            if (areZllAttributesSupported)
            {
                command = new ZclCommand(this, COMMAND_OFFWITHEFFECT_ZLL, "OffWithEffect", false);
                var parameter = new ZclValue(ZclHelper.UINT8_TYPE, "EffectIdentifier");
                command.AddInParam(parameter);
                parameter = new ZclValue(ZclHelper.UINT8_TYPE, "EffectVariant");
                command.AddInParam(parameter);
                m_commandList.Add(command.Id, command);

                command = new ZclCommand(this, COMMAND_ONWITHRECALLGLOBALSCENE_ZLL, "OnWithRecallGlobalScene", false);
                m_commandList.Add(command.Id, command);

                command   = new ZclCommand(this, COMMAND_ONWITHTIMEOFF_ZLL, "OnWithTimeOff", false);
                parameter = new ZclValue(ZclHelper.UINT8_TYPE, "OnOffControl");
                command.AddInParam(parameter);
                parameter = new ZclValue(ZclHelper.UINT16_TYPE, "OnTime");
                command.AddInParam(parameter);
                parameter = new ZclValue(ZclHelper.UINT16_TYPE, "OffWaitTime");
                command.AddInParam(parameter);
                m_commandList.Add(command.Id, command);
            }

            // call parent class "post constructor"
            PostChildClassConstructor();
        }
Example #8
0
        internal DoorLockCluster(ZigBeeEndPoint endPoint, List <UInt16> supportedAttributes)
            : base(endPoint)
        {
            // set cluster name and cluster Id
            Name = CLUSTER_NAME;
            m_Id = CLUSTER_ID;

            // if supportedAttributes is null assume all attributes supported
            bool supportAllAttributesBydefault = false;

            if (supportedAttributes == null)
            {
                supportAllAttributesBydefault = true;
            }

            // Lock State attribute (read only, mandatory, reportable))
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_LOCKSTATE))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_LOCKSTATE, "LockState", ZclHelper.ENUMERATION_8_BIT_TYPE, true, false, true);
                m_attributeList.Add(attrib.Id, attrib);
            }

            // Lock Type attribute (read only)
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_LOCKTYPE))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_LOCKTYPE, "LockType", ZclHelper.ENUMERATION_8_BIT_TYPE, true, false);
                m_attributeList.Add(attrib.Id, attrib);
            }

            // Actuator Enabled attribute (read only)
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_ACTUATORENABLED))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_ACTUATORENABLED, "ActuatorEnabled", ZclHelper.BOOLEAN_TYPE, true, false);
                m_attributeList.Add(attrib.Id, attrib);
            }

            // Door State attribute (read only, optional, reportable)
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_DOORSTATE))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_DOORSTATE, "DoorState", ZclHelper.ENUMERATION_8_BIT_TYPE, true, true, true);
                m_attributeList.Add(attrib.Id, attrib);
            }

            // Door Open Events attribute
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_DOOROPENEVENTS))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_DOOROPENEVENTS, "DoorOpenEvents", ZclHelper.UINT32_TYPE, false, true);
                m_attributeList.Add(attrib.Id, attrib);
            }

            // Door Close Events attribute
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_DOORCLOSEDEVENTS))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_DOORCLOSEDEVENTS, "DoorCloseEvents", ZclHelper.UINT32_TYPE, false, true);
                m_attributeList.Add(attrib.Id, attrib);
            }

            // Open Period attribute
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_OPENPERIOD))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_OPENPERIOD, "OpenPeriod", ZclHelper.UINT16_TYPE, false, true);
                m_attributeList.Add(attrib.Id, attrib);
            }

            // IMPORTANT NOTE,  parameters MUST be added in parameter list of each command
            // in the order specified in ZCL standard

            // Lock door command
            var command   = new ZclCommand(this, COMMAND_LOCKDOOR, "LockDoor", true);
            var parameter = new ZclValue(ZclHelper.ENUMERATION_8_BIT_TYPE, "Status");

            command.AddOutParam(parameter);
            m_commandList.Add(command.Id, command);

            // Unlock door command
            command   = new ZclCommand(this, COMMAND_UNLOCKDOOR, "UnlockDoor", true);
            parameter = new ZclValue(ZclHelper.ENUMERATION_8_BIT_TYPE, "Status");
            command.AddOutParam(parameter);
            m_commandList.Add(command.Id, command);

            // call parent class "post constructor"
            PostChildClassConstructor();
        }
        internal ColorControlCluster(ZigBeeEndPoint endPoint, List <UInt16> supportedAttributes)
            : base(endPoint)
        {
            // set cluster name and cluster Id
            Name = CLUSTER_NAME;
            m_Id = CLUSTER_ID;

            // if supportedAttributes is null assume all attributes supported
            bool supportAllAttributesBydefault = false;

            if (supportedAttributes == null)
            {
                supportAllAttributesBydefault = true;
            }

            // current hue attribute (read only)
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_CURRENTHUE))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_CURRENTHUE, "CurrentHue", ZclHelper.UINT8_TYPE, true, true);
                m_attributeList.Add(attrib.Id, attrib);
            }
            // current saturation (read only)
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_CURRENTSATURATION))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_CURRENTSATURATION, "CurrentSaturation", ZclHelper.UINT8_TYPE, true, true);
                m_attributeList.Add(attrib.Id, attrib);
            }
            // remaining time (read only)
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_REMAININGTIME))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_REMAININGTIME, "RemainingTime", ZclHelper.UINT16_TYPE, true, true);
                m_attributeList.Add(attrib.Id, attrib);
            }
            // current X (read only)
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_CURRENTX))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_CURRENTX, "CurrentX", ZclHelper.UINT16_TYPE, true, false);
                m_attributeList.Add(attrib.Id, attrib);
            }
            // current Y (read only)
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_CURRENTY))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_CURRENTY, "CurrentY", ZclHelper.UINT16_TYPE, true, false);
                m_attributeList.Add(attrib.Id, attrib);
            }
            // drift compensation (read only)
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_DRIFTCOMPENSATION))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_DRIFTCOMPENSATION, "DriftCompensation", ZclHelper.UINT8_TYPE, true, true);
                m_attributeList.Add(attrib.Id, attrib);
            }
            // compensation text (read only)
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_COMPENSATIONTEXT))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_COMPENSATIONTEXT, "CompensationText", ZclHelper.CHAR_STRING_TYPE, true, true);
                m_attributeList.Add(attrib.Id, attrib);
            }
            // color temperature (read only)
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_COLORTEMPERATURE))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_COLORTEMPERATURE, "ColorTemperature", ZclHelper.UINT16_TYPE, true, true);
                m_attributeList.Add(attrib.Id, attrib);
            }
            // color mode (read only)
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_COLORMODE))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_COLORMODE, "ColorMode", ZclHelper.ENUMERATION_8_BIT_TYPE, true, true);
                m_attributeList.Add(attrib.Id, attrib);
            }
            // number of primaries (read only)
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_NUMBEROFPRIMARIES))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_NUMBEROFPRIMARIES, "NumberOfPrimaries", ZclHelper.UINT8_TYPE, true, true);
                m_attributeList.Add(attrib.Id, attrib);
            }
            // primary 1 X (read only)
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_PRIMARY1X))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_PRIMARY1X, "Primary1X", ZclHelper.UINT16_TYPE, true, true);
                m_attributeList.Add(attrib.Id, attrib);
            }
            // primary 1 Y (read only)
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_PRIMARY1Y))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_PRIMARY1Y, "Primary1Y", ZclHelper.UINT16_TYPE, true, true);
                m_attributeList.Add(attrib.Id, attrib);
            }
            // primary 1 intensity (read only)
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_PRIMARY1INTENSITY))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_PRIMARY1INTENSITY, "Primary1Intensity", ZclHelper.UINT8_TYPE, true, true);
                m_attributeList.Add(attrib.Id, attrib);
            }
            // primary 2 X (read only)
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_PRIMARY2X))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_PRIMARY2X, "Primary2X", ZclHelper.UINT16_TYPE, true, true);
                m_attributeList.Add(attrib.Id, attrib);
            }
            // primary 2 Y (read only)
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_PRIMARY2Y))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_PRIMARY2Y, "Primary2Y", ZclHelper.UINT16_TYPE, true, true);
                m_attributeList.Add(attrib.Id, attrib);
            }
            // primary 2 intensity (read only)
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_PRIMARY2INTENSITY))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_PRIMARY2INTENSITY, "Primary2Intensity", ZclHelper.UINT8_TYPE, true, true);
                m_attributeList.Add(attrib.Id, attrib);
            }
            // primary 3 X (read only)
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_PRIMARY3X))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_PRIMARY3X, "Primary3X", ZclHelper.UINT16_TYPE, true, true);
                m_attributeList.Add(attrib.Id, attrib);
            }
            // primary 3 Y (read only)
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_PRIMARY3Y))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_PRIMARY3Y, "Primary3Y", ZclHelper.UINT16_TYPE, true, true);
                m_attributeList.Add(attrib.Id, attrib);
            }
            // primary 3 intensity (read only)
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_PRIMARY3INTENSITY))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_PRIMARY3INTENSITY, "Primary3Intensity", ZclHelper.UINT8_TYPE, true, true);
                m_attributeList.Add(attrib.Id, attrib);
            }
            // primary 4 X (read only)
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_PRIMARY4X))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_PRIMARY4X, "Primary4X", ZclHelper.UINT16_TYPE, true, true);
                m_attributeList.Add(attrib.Id, attrib);
            }
            // primary 4 Y (read only)
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_PRIMARY4Y))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_PRIMARY4Y, "Primary4Y", ZclHelper.UINT16_TYPE, true, true);
                m_attributeList.Add(attrib.Id, attrib);
            }
            // primary 4 intensity (read only)
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_PRIMARY4INTENSITY))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_PRIMARY4INTENSITY, "Primary4Intensity", ZclHelper.UINT8_TYPE, true, true);
                m_attributeList.Add(attrib.Id, attrib);
            }
            // primary 5 X (read only)
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_PRIMARY5X))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_PRIMARY5X, "Primary5X", ZclHelper.UINT16_TYPE, true, true);
                m_attributeList.Add(attrib.Id, attrib);
            }
            // primary 5 Y (read only)
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_PRIMARY5Y))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_PRIMARY5Y, "Primary5Y", ZclHelper.UINT16_TYPE, true, true);
                m_attributeList.Add(attrib.Id, attrib);
            }
            // primary 5 intensity (read only)
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_PRIMARY5INTENSITY))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_PRIMARY5INTENSITY, "Primary5Intensity", ZclHelper.UINT8_TYPE, true, true);
                m_attributeList.Add(attrib.Id, attrib);
            }
            // primary 6 X (read only)
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_PRIMARY6X))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_PRIMARY6X, "Primary6X", ZclHelper.UINT16_TYPE, true, true);
                m_attributeList.Add(attrib.Id, attrib);
            }
            // primary 6 Y (read only)
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_PRIMARY6Y))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_PRIMARY6Y, "Primary6Y", ZclHelper.UINT16_TYPE, true, true);
                m_attributeList.Add(attrib.Id, attrib);
            }
            // primary 6 intensity (read only)
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_PRIMARY6INTENSITY))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_PRIMARY6INTENSITY, "Primary6Intensity", ZclHelper.UINT8_TYPE, true, true);
                m_attributeList.Add(attrib.Id, attrib);
            }
            // white point X
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_WHITEPOINTX))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_WHITEPOINTX, "WhitePointX", ZclHelper.UINT16_TYPE, false, true);
                m_attributeList.Add(attrib.Id, attrib);
            }
            // white point Y
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_WHITEPOINTY))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_WHITEPOINTY, "WhitePointY", ZclHelper.UINT16_TYPE, false, true);
                m_attributeList.Add(attrib.Id, attrib);
            }
            // color point R X
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_COLORPOINTRX))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_COLORPOINTRX, "ColorPointRX", ZclHelper.UINT16_TYPE, false, true);
                m_attributeList.Add(attrib.Id, attrib);
            }
            // color point R Y
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_COLORPOINTRY))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_COLORPOINTRY, "ColorPointRY", ZclHelper.UINT16_TYPE, false, true);
                m_attributeList.Add(attrib.Id, attrib);
            }
            // color point R intensity
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_COLORPOINTRINTENSITY))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_COLORPOINTRINTENSITY, "ColorPointRIntensity", ZclHelper.UINT8_TYPE, false, true);
                m_attributeList.Add(attrib.Id, attrib);
            }
            // color point G X
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_COLORPOINTGX))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_COLORPOINTGX, "ColorPointGX", ZclHelper.UINT16_TYPE, false, true);
                m_attributeList.Add(attrib.Id, attrib);
            }
            // color point G Y
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_COLORPOINTGY))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_COLORPOINTGY, "ColorPointGY", ZclHelper.UINT16_TYPE, false, true);
                m_attributeList.Add(attrib.Id, attrib);
            }
            // color point G intensity
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_COLORPOINTGINTENSITY))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_COLORPOINTGINTENSITY, "ColorPointGIntensity", ZclHelper.UINT8_TYPE, false, true);
                m_attributeList.Add(attrib.Id, attrib);
            }
            // color point B X
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_COLORPOINTBX))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_COLORPOINTBX, "ColorPointBX", ZclHelper.UINT16_TYPE, false, true);
                m_attributeList.Add(attrib.Id, attrib);
            }
            // color point B Y
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_COLORPOINTBY))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_COLORPOINTBY, "ColorPointBY", ZclHelper.UINT16_TYPE, false, true);
                m_attributeList.Add(attrib.Id, attrib);
            }
            // color point B intensity
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_COLORPOINTBINTENSITY))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_COLORPOINTBINTENSITY, "ColorPointBIntensity", ZclHelper.UINT8_TYPE, false, true);
                m_attributeList.Add(attrib.Id, attrib);
            }

            // move to hue command
            var command   = new ZclCommand(this, COMMAND_MOVETOHUE, "MoveToHue", false);
            var parameter = new ZclValue(ZclHelper.UINT8_TYPE, "Hue");

            command.AddInParam(parameter);
            parameter = new ZclValue(ZclHelper.ENUMERATION_8_BIT_TYPE, "Direction");
            command.AddInParam(parameter);
            parameter = new ZclValue(ZclHelper.UINT16_TYPE, "TransitionTime");
            command.AddInParam(parameter);
            m_commandList.Add(command.Id, command);

            // move hue command
            command   = new ZclCommand(this, COMMAND_MOVEHUE, "MoveHue", false);
            parameter = new ZclValue(ZclHelper.ENUMERATION_8_BIT_TYPE, "MoveMode");
            command.AddInParam(parameter);
            parameter = new ZclValue(ZclHelper.UINT8_TYPE, "Rate");
            command.AddInParam(parameter);
            m_commandList.Add(command.Id, command);

            // step hue command
            command   = new ZclCommand(this, COMMAND_STEPHUE, "StepHue", false);
            parameter = new ZclValue(ZclHelper.ENUMERATION_8_BIT_TYPE, "StepMode");
            command.AddInParam(parameter);
            parameter = new ZclValue(ZclHelper.UINT8_TYPE, "StepSize");
            command.AddInParam(parameter);
            parameter = new ZclValue(ZclHelper.UINT8_TYPE, "TransitionTime");
            command.AddInParam(parameter);
            m_commandList.Add(command.Id, command);

            // move to saturation command
            command   = new ZclCommand(this, COMMAND_MOVETOSATURATION, "MoveToSaturation", false);
            parameter = new ZclValue(ZclHelper.UINT8_TYPE, "Saturation");
            command.AddInParam(parameter);
            parameter = new ZclValue(ZclHelper.UINT16_TYPE, "TransitionTime");
            command.AddInParam(parameter);
            m_commandList.Add(command.Id, command);

            // move saturation command
            command   = new ZclCommand(this, COMMAND_MOVESATURATION, "MoveSaturation", false);
            parameter = new ZclValue(ZclHelper.ENUMERATION_8_BIT_TYPE, "MoveMode");
            command.AddInParam(parameter);
            parameter = new ZclValue(ZclHelper.UINT8_TYPE, "Rate");
            command.AddInParam(parameter);
            m_commandList.Add(command.Id, command);

            // step saturation command
            command   = new ZclCommand(this, COMMAND_STEPSATURATION, "StepSaturation", false);
            parameter = new ZclValue(ZclHelper.ENUMERATION_8_BIT_TYPE, "StepMode");
            command.AddInParam(parameter);
            parameter = new ZclValue(ZclHelper.UINT8_TYPE, "StepSize");
            command.AddInParam(parameter);
            parameter = new ZclValue(ZclHelper.UINT8_TYPE, "TransitionTime");
            command.AddInParam(parameter);
            m_commandList.Add(command.Id, command);

            // move hue and saturation command
            command   = new ZclCommand(this, COMMAND_MOVETOHUEANDSATURATION, "MoveHueAndSaturation", false);
            parameter = new ZclValue(ZclHelper.UINT8_TYPE, "Hue");
            command.AddInParam(parameter);
            parameter = new ZclValue(ZclHelper.UINT8_TYPE, "Saturation");
            command.AddInParam(parameter);
            parameter = new ZclValue(ZclHelper.UINT16_TYPE, "TransitionTime");
            command.AddInParam(parameter);
            m_commandList.Add(command.Id, command);

            // move to color command
            command   = new ZclCommand(this, COMMAND_MOVETOCOLOR, "MoveToColor", false);
            parameter = new ZclValue(ZclHelper.UINT16_TYPE, "ColorX");
            command.AddInParam(parameter);
            parameter = new ZclValue(ZclHelper.UINT16_TYPE, "ColorY");
            command.AddInParam(parameter);
            parameter = new ZclValue(ZclHelper.UINT16_TYPE, "TransitionTime");
            command.AddInParam(parameter);
            m_commandList.Add(command.Id, command);

            // move color command
            command   = new ZclCommand(this, COMMAND_MOVECOLOR, "MoveColor", false);
            parameter = new ZclValue(ZclHelper.INT16_TYPE, "RateX");
            command.AddInParam(parameter);
            parameter = new ZclValue(ZclHelper.INT16_TYPE, "RateY");
            command.AddInParam(parameter);
            m_commandList.Add(command.Id, command);

            // step color command
            command   = new ZclCommand(this, COMMAND_STEPCOLOR, "StepColor", false);
            parameter = new ZclValue(ZclHelper.INT16_TYPE, "StepX");
            command.AddInParam(parameter);
            parameter = new ZclValue(ZclHelper.INT16_TYPE, "StepY");
            command.AddInParam(parameter);
            parameter = new ZclValue(ZclHelper.UINT16_TYPE, "TransitionTime");
            command.AddInParam(parameter);
            m_commandList.Add(command.Id, command);

            // move to color temperature command
            command   = new ZclCommand(this, COMMAND_MOVETOCOLORTEMPERATURE, "MoveToColorTemperature", false);
            parameter = new ZclValue(ZclHelper.UINT16_TYPE, "ColorTemperature");
            command.AddInParam(parameter);
            parameter = new ZclValue(ZclHelper.UINT16_TYPE, "TransitionTime");
            command.AddInParam(parameter);
            m_commandList.Add(command.Id, command);

            // call parent class "post constructor"
            PostChildClassConstructor();
        }