gpt4 book ai didi

com.zsmartsystems.zigbee.zcl.protocol.ZclDataType.getId()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-19 06:33:31 27 4
gpt4 key购买 nike

本文整理了Java中com.zsmartsystems.zigbee.zcl.protocol.ZclDataType.getId()方法的一些代码示例,展示了ZclDataType.getId()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZclDataType.getId()方法的具体详情如下:
包路径:com.zsmartsystems.zigbee.zcl.protocol.ZclDataType
类名称:ZclDataType
方法名:getId

ZclDataType.getId介绍

暂无

代码示例

代码示例来源:origin: zsmartsystems/com.zsmartsystems.zigbee

@Override
public void serialize(final ZigBeeSerializer serializer) {
  serializer.appendZigBeeType(attributeIdentifier, ZclDataType.UNSIGNED_16_BIT_INTEGER);
  serializer.appendZigBeeType(attributeDataType.getId(), ZclDataType.UNSIGNED_8_BIT_INTEGER);
  serializer.appendZigBeeType(attributeValue, attributeDataType);
}

代码示例来源:origin: zsmartsystems/com.zsmartsystems.zigbee

@Override
public void serialize(final ZigBeeSerializer serializer) {
  serializer.appendZigBeeType(attributeIdentifier, ZclDataType.UNSIGNED_16_BIT_INTEGER);
  serializer.appendZigBeeType(attributeDataType.getId(), ZclDataType.UNSIGNED_8_BIT_INTEGER);
  serializer.appendZigBeeType(attributeValue, attributeDataType);
}

代码示例来源:origin: zsmartsystems/com.zsmartsystems.zigbee

@Test
public void getId() {
  assertEquals(0x10, ZclDataType.BOOLEAN.getId());
  assertEquals(0x42, ZclDataType.CHARACTER_STRING.getId());
  assertEquals(0x08, ZclDataType.DATA_8_BIT.getId());
}

代码示例来源:origin: zsmartsystems/com.zsmartsystems.zigbee

@Override
public void serialize(final ZigBeeSerializer serializer) {
  serializer.appendZigBeeType((short) attributeIdentifier, ZclDataType.UNSIGNED_16_BIT_INTEGER);
  serializer.appendZigBeeType(status, ZclDataType.ZCL_STATUS);
  serializer.appendZigBeeType((byte) attributeDataType.getId(), ZclDataType.UNSIGNED_8_BIT_INTEGER);
  serializer.appendZigBeeType(attributeValue, attributeDataType);
}

代码示例来源:origin: zsmartsystems/com.zsmartsystems.zigbee

buffer[length++] = ((ZclDataType) data).getId();
  break;
default:
  throw new IllegalArgumentException("No writer defined in " + ZigBeeDeserializer.class.getSimpleName()
      + " for " + type.toString() + " (" + type.getId() + ")");

代码示例来源:origin: zsmartsystems/com.zsmartsystems.zigbee

default:
  throw new IllegalArgumentException("No reader defined in " + ZigBeeDeserializer.class.getSimpleName()
      + " for " + type.toString() + " (" + type.getId() + ")");

代码示例来源:origin: zsmartsystems/com.zsmartsystems.zigbee

@Override
public void serialize(final ZigBeeSerializer serializer) {
  serializer.appendZigBeeType(direction, ZclDataType.UNSIGNED_8_BIT_INTEGER);
  serializer.appendZigBeeType(attributeIdentifier, ZclDataType.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.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.getId(), ZclDataType.UNSIGNED_8_BIT_INTEGER);
    serializer.appendZigBeeType(minimumReportingInterval, ZclDataType.UNSIGNED_16_BIT_INTEGER);
    serializer.appendZigBeeType(maximumReportingInterval, ZclDataType.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);
    }
  }
}

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com