コード例 #1
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);
        }
コード例 #2
0
 internal override void Deserialize(ZclFieldDeserializer deserializer)
 {
     EarliestImplementationTime = deserializer.Deserialize <DateTime>(ZclDataType.Get(DataType.UTCTIME));
 }
コード例 #3
0
 public override void Deserialize(ZclFieldDeserializer deserializer)
 {
     GroupID = deserializer.Deserialize <ushort>(ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER));
 }
コード例 #4
0
 internal override void Serialize(ZclFieldSerializer serializer)
 {
     serializer.Serialize(StepX, ZclDataType.Get(DataType.SIGNED_16_BIT_INTEGER));
     serializer.Serialize(StepY, ZclDataType.Get(DataType.SIGNED_16_BIT_INTEGER));
     serializer.Serialize(TransitionTime, ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER));
 }
コード例 #5
0
        internal override void Serialize(ZclFieldSerializer serializer)
        {
            base.Serialize(serializer);

            serializer.Serialize(Status, ZclDataType.Get(DataType.ZDO_STATUS));
        }
コード例 #6
0
 public override void Deserialize(ZclFieldDeserializer deserializer)
 {
     DiscoveryComplete  = deserializer.Deserialize <bool>(ZclDataType.Get(DataType.BOOLEAN));
     CommandIdentifiers = deserializer.Deserialize <List <byte> >(ZclDataType.Get(DataType.X_UNSIGNED_8_BIT_INTEGER));
 }
コード例 #7
0
        protected override Dictionary <ushort, ZclAttribute> InitializeServerAttributes()
        {
            Dictionary <ushort, ZclAttribute> attributeMap = new Dictionary <ushort, ZclAttribute>(1);

            attributeMap.Add(ATTR_ALARMCOUNT, new ZclAttribute(this, ATTR_ALARMCOUNT, "Alarm Count", ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER), false, true, false, false));

            return(attributeMap);
        }
コード例 #8
0
 public override void Deserialize(ZclFieldDeserializer deserializer)
 {
     StartFastPolling = deserializer.Deserialize <bool>(ZclDataType.Get(DataType.BOOLEAN));
     FastPollTimeout  = deserializer.Deserialize <ushort>(ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER));
 }
コード例 #9
0
 public override void Serialize(ZclFieldSerializer serializer)
 {
     serializer.Serialize(NumberOfZones, ZclDataType.Get(DataType.UNSIGNED_8_BIT_INTEGER));
     serializer.Serialize(ZoneIDs, ZclDataType.Get(DataType.N_X_UNSIGNED_8_BIT_INTEGER));
     serializer.Serialize(ArmDisarmCode, ZclDataType.Get(DataType.CHARACTER_STRING));
 }
コード例 #10
0
 public override void Serialize(ZclFieldSerializer serializer)
 {
     serializer.Serialize(Hue, ZclDataType.Get(DataType.UNSIGNED_8_BIT_INTEGER));
     serializer.Serialize(Saturation, ZclDataType.Get(DataType.UNSIGNED_8_BIT_INTEGER));
     serializer.Serialize(TransitionTime, ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER));
 }
コード例 #11
0
 public override void Serialize(ZclFieldSerializer serializer)
 {
     serializer.Serialize(StartFastPolling, ZclDataType.Get(DataType.BOOLEAN));
     serializer.Serialize(FastPollTimeout, ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER));
 }
コード例 #12
0
 public override void Deserialize(ZclFieldDeserializer deserializer)
 {
     ZoneType         = deserializer.Deserialize <ushort>(ZclDataType.Get(DataType.ENUMERATION_16_BIT));
     ManufacturerCode = deserializer.Deserialize <ushort>(ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER));
 }
コード例 #13
0
 public override void Serialize(ZclFieldSerializer serializer)
 {
     serializer.Serialize(ZoneType, ZclDataType.Get(DataType.ENUMERATION_16_BIT));
     serializer.Serialize(ManufacturerCode, ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER));
 }
コード例 #14
0
        // 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);
        }
コード例 #15
0
 public override void Deserialize(ZclFieldDeserializer deserializer)
 {
     StartAttributeIdentifier    = deserializer.Deserialize <ushort>(ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER));
     MaximumAttributeIdentifiers = deserializer.Deserialize <byte>(ZclDataType.Get(DataType.UNSIGNED_8_BIT_INTEGER));
 }
コード例 #16
0
 public override void Deserialize(ZclFieldDeserializer deserializer)
 {
     NumberOfZones = deserializer.Deserialize <byte>(ZclDataType.Get(DataType.UNSIGNED_8_BIT_INTEGER));
     ZoneIDs       = deserializer.Deserialize <List <byte> >(ZclDataType.Get(DataType.N_X_UNSIGNED_8_BIT_INTEGER));
     ArmDisarmCode = deserializer.Deserialize <string>(ZclDataType.Get(DataType.CHARACTER_STRING));
 }
コード例 #17
0
 public override void Serialize(ZclFieldSerializer serializer)
 {
     serializer.Serialize(DiscoveryComplete, ZclDataType.Get(DataType.BOOLEAN));
     serializer.Serialize(CommandIdentifiers, ZclDataType.Get(DataType.X_UNSIGNED_8_BIT_INTEGER));
 }
コード例 #18
0
        // 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);
        }
コード例 #19
0
        protected override Dictionary <ushort, ZclAttribute> InitializeServerAttributes()
        {
            Dictionary <ushort, ZclAttribute> attributeMap = new Dictionary <ushort, ZclAttribute>(9);

            attributeMap.Add(ATTR_STATETEXT, new ZclAttribute(this, ATTR_STATETEXT, "State Text", ZclDataType.Get(DataType.CHARACTER_STRING), false, true, true, false));
            attributeMap.Add(ATTR_DESCRIPTION, new ZclAttribute(this, ATTR_DESCRIPTION, "Description", ZclDataType.Get(DataType.CHARACTER_STRING), false, true, true, false));
            attributeMap.Add(ATTR_NUMBEROFSTATES, new ZclAttribute(this, ATTR_NUMBEROFSTATES, "Number Of States", ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER), true, true, true, false));
            attributeMap.Add(ATTR_OUTOFSERVICE, new ZclAttribute(this, ATTR_OUTOFSERVICE, "Out Of Service", ZclDataType.Get(DataType.BOOLEAN), true, true, true, false));
            attributeMap.Add(ATTR_PRESENTVALUE, new ZclAttribute(this, ATTR_PRESENTVALUE, "Present Value", ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER), true, true, true, false));
            attributeMap.Add(ATTR_RELIABILITY, new ZclAttribute(this, ATTR_RELIABILITY, "Reliability", ZclDataType.Get(DataType.ENUMERATION_8_BIT), false, true, true, false));
            attributeMap.Add(ATTR_RELINQUISHDEFAULT, new ZclAttribute(this, ATTR_RELINQUISHDEFAULT, "Relinquish Default", ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER), false, true, true, false));
            attributeMap.Add(ATTR_STATUSFLAGS, new ZclAttribute(this, ATTR_STATUSFLAGS, "Status Flags", ZclDataType.Get(DataType.BITMAP_8_BIT), true, true, false, false));
            attributeMap.Add(ATTR_APPLICATIONTYPE, new ZclAttribute(this, ATTR_APPLICATIONTYPE, "Application Type", ZclDataType.Get(DataType.SIGNED_32_BIT_INTEGER), false, true, false, false));

            return(attributeMap);
        }
コード例 #20
0
ファイル: AddSceneCommand.cs プロジェクト: lulzzz/ZigbeeNet
 public override void Deserialize(ZclFieldDeserializer deserializer)
 {
     GroupID            = deserializer.Deserialize <ushort>(ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER));
     SceneID            = deserializer.Deserialize <byte>(ZclDataType.Get(DataType.UNSIGNED_8_BIT_INTEGER));
     TransitionTime     = deserializer.Deserialize <ushort>(ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER));
     SceneName          = deserializer.Deserialize <string>(ZclDataType.Get(DataType.CHARACTER_STRING));
     ExtensionFieldSets = deserializer.Deserialize <List <ExtensionFieldSet> >(ZclDataType.Get(DataType.N_X_EXTENSION_FIELD_SET));
 }
コード例 #21
0
 internal override void Deserialize(ZclFieldDeserializer deserializer)
 {
     Hue            = deserializer.Deserialize <byte>(ZclDataType.Get(DataType.UNSIGNED_8_BIT_INTEGER));
     Saturation     = deserializer.Deserialize <byte>(ZclDataType.Get(DataType.UNSIGNED_8_BIT_INTEGER));
     TransitionTime = deserializer.Deserialize <ushort>(ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER));
 }
コード例 #22
0
 public override void Serialize(ZclFieldSerializer serializer)
 {
     serializer.Serialize(StepMode, ZclDataType.Get(DataType.ENUMERATION_8_BIT));
     serializer.Serialize(StepSize, ZclDataType.Get(DataType.UNSIGNED_8_BIT_INTEGER));
     serializer.Serialize(TransitionTime, ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER));
 }
コード例 #23
0
 internal override void Deserialize(ZclFieldDeserializer deserializer)
 {
     StepX          = deserializer.Deserialize <short>(ZclDataType.Get(DataType.SIGNED_16_BIT_INTEGER));
     StepY          = deserializer.Deserialize <short>(ZclDataType.Get(DataType.SIGNED_16_BIT_INTEGER));
     TransitionTime = deserializer.Deserialize <ushort>(ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER));
 }
コード例 #24
0
 public override void Deserialize(ZclFieldDeserializer deserializer)
 {
     StepMode       = deserializer.Deserialize <byte>(ZclDataType.Get(DataType.ENUMERATION_8_BIT));
     StepSize       = deserializer.Deserialize <byte>(ZclDataType.Get(DataType.UNSIGNED_8_BIT_INTEGER));
     TransitionTime = deserializer.Deserialize <ushort>(ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER));
 }
コード例 #25
0
 internal override void Serialize(ZclFieldSerializer serializer)
 {
     serializer.Serialize(EarliestImplementationTime, ZclDataType.Get(DataType.UTCTIME));
 }
コード例 #26
0
        internal override void Deserialize(ZclFieldDeserializer deserializer)
        {
            base.Deserialize(deserializer);

            // Create lists
            BindingTableList = new List <List <BindingTable> >();

            Status = (ZdoStatus)deserializer.Deserialize(ZclDataType.Get(DataType.ZDO_STATUS));

            if (Status != ZdoStatus.SUCCESS)
            {
                // Don't read the full response if we have an error
                return;
            }

            BindingTableEntries = (ushort)deserializer.Deserialize(ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER));
            ushort?bindingTableListCount = (ushort?)deserializer.Deserialize(ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER));

            if (bindingTableListCount != null)
            {
                for (int cnt = 0; cnt < bindingTableListCount; cnt++)
                {
                    BindingTableList.Add((List <BindingTable>)deserializer.Deserialize(ZclDataType.Get(DataType.N_X_BINDING_TABLE)));
                }
            }
        }
コード例 #27
0
 public override void Serialize(ZclFieldSerializer serializer)
 {
     serializer.Serialize(GroupID, ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER));
 }
コード例 #28
0
 public override void Serialize(ZclFieldSerializer serializer)
 {
     serializer.Serialize(StartAttributeIdentifier, ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER));
     serializer.Serialize(MaximumAttributeIdentifiers, ZclDataType.Get(DataType.UNSIGNED_8_BIT_INTEGER));
 }
コード例 #29
0
 public override void Serialize(ZclFieldSerializer serializer)
 {
     serializer.Serialize(DiscoveryComplete, ZclDataType.Get(DataType.BOOLEAN));
     serializer.Serialize(AttributeInformation, ZclDataType.Get(DataType.N_X_ATTRIBUTE_INFORMATION));
 }
コード例 #30
0
 internal override void Deserialize(ZclFieldDeserializer deserializer)
 {
     GroupId   = deserializer.Deserialize <ushort>(ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER));
     GroupName = deserializer.Deserialize <string>(ZclDataType.Get(DataType.CHARACTER_STRING));
 }