public void Serialize(IZigBeeSerializer serializer) { serializer.AppendZigBeeType(Direction, ZclDataType.Get(DataType.UNSIGNED_8_BIT_INTEGER)); serializer.AppendZigBeeType(AttributeIdentifier, ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER)); if (Direction == 1) { // If direction is set to 0x01, then the timeout period field is included in the payload, // and the attribute data type field, the minimum reporting interval field, the // maximum reporting interval field and the reportable change field are omitted. The // record is sent to a cluster client (or server) to configure how it should expect // reports from a server (or client) of the same cluster. serializer.AppendZigBeeType(TimeoutPeriod, ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER)); } else { // If direction is set to 0x00, then the attribute data type field, the minimum // reporting interval field, the maximum reporting interval field and the reportable // change field are included in the payload, and the timeout period field is omitted. // The record is sent to a cluster server (or client) to configure how it sends reports to // a client (or server) of the same cluster. serializer.AppendZigBeeType(AttributeDataType.Id, ZclDataType.Get(DataType.UNSIGNED_8_BIT_INTEGER)); serializer.AppendZigBeeType(MinimumReportingInterval, ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER)); serializer.AppendZigBeeType(MaximumReportingInterval, ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER)); // The reportable change field shall contain the minimum change to the attribute that // will result in a report being issued. This field is of variable length. For attributes // with 'analog' data typethe field has the same data type as the attribute. The sign (if any) of the // reportable change field is ignored. For attributes of 'discrete' data type this field is omitted. if (AttributeDataType.IsAnalog) { serializer.AppendZigBeeType(ReportableChange, AttributeDataType); } } }
public void Serialize(IZigBeeSerializer serializer) { serializer.AppendZigBeeType((short)AttributeIdentifier, ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER)); serializer.AppendZigBeeType(Status, ZclDataType.Get(DataType.ZCL_STATUS)); serializer.AppendZigBeeType((byte)AttributeDataType.Id, ZclDataType.Get(DataType.UNSIGNED_8_BIT_INTEGER)); serializer.AppendZigBeeType(AttributeValue, AttributeDataType); }
public void Serialize(IZigBeeSerializer serializer) { serializer.AppendZigBeeType(Status, DataType.UNSIGNED_8_BIT_INTEGER); if (Status == ZclStatus.SUCCESS) { serializer.AppendZigBeeType(Direction, DataType.BOOLEAN); serializer.AppendZigBeeType(AttributeIdentifier, DataType.UNSIGNED_16_BIT_INTEGER); } }
public void Serialize(IZigBeeSerializer serializer) { serializer.AppendZigBeeType(NeighborAddress, DataType.IEEE_ADDRESS); serializer.AppendZigBeeType((short)Coordinate1, DataType.UNSIGNED_16_BIT_INTEGER); serializer.AppendZigBeeType((short)Coordinate2, DataType.UNSIGNED_16_BIT_INTEGER); serializer.AppendZigBeeType((short)Coordinate3, DataType.UNSIGNED_16_BIT_INTEGER); serializer.AppendZigBeeType((byte)Rssi, DataType.UNSIGNED_8_BIT_INTEGER); serializer.AppendZigBeeType((byte)MeasurementCount, DataType.UNSIGNED_8_BIT_INTEGER); }
public void Serialize(IZigBeeSerializer serializer) { serializer.AppendZigBeeType(SrcAddr, ZclDataType.Get(DataType.IEEE_ADDRESS)); serializer.AppendZigBeeType(SrcEndpoint, ZclDataType.Get(DataType.UNSIGNED_8_BIT_INTEGER)); serializer.AppendZigBeeType(ClusterId, ZclDataType.Get(DataType.CLUSTERID)); serializer.AppendZigBeeType(DstAddrMode, ZclDataType.Get(DataType.UNSIGNED_8_BIT_INTEGER)); if (DstAddrMode == 1) { serializer.AppendZigBeeType(DstGroupAddr, ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER)); } else if (DstAddrMode == 3) { serializer.AppendZigBeeType(DstAddr, ZclDataType.Get(DataType.IEEE_ADDRESS)); serializer.AppendZigBeeType(DstNodeEndpoint, ZclDataType.Get(DataType.UNSIGNED_8_BIT_INTEGER)); } }
public void Serialize(IZigBeeSerializer serializer) { serializer.AppendZigBeeType(Identifier, DataType.UNSIGNED_16_BIT_INTEGER); serializer.AppendZigBeeType(AttributeDataType, DataType.UNSIGNED_8_BIT_INTEGER); }
public void Serialize(IZigBeeSerializer serializer) { serializer.AppendZigBeeType(Value, DataType.UNSIGNED_8_BIT_INTEGER); }
public void Serialize(IZigBeeSerializer serializer) { serializer.AppendZigBeeType(ClusterId, ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER)); serializer.AppendZigBeeType(Data, ZclDataType.Get(DataType.UNSIGNED_8_BIT_INTEGER_ARRAY)); }
public void Serialize(IZigBeeSerializer serializer) { serializer.AppendZigBeeType(Status, ZclDataType.Get(DataType.UNSIGNED_8_BIT_INTEGER)); serializer.AppendZigBeeType(AttributeIdentifier, ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER)); }
public void Serialize(IZigBeeSerializer serializer) { serializer.AppendZigBeeType(Value, ZclDataType.Get(DataType.UNSIGNED_16_BIT_INTEGER)); }