gpt4 book ai didi

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

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

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

ZclDataType.getType介绍

暂无

代码示例

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

@Override
public void deserialize(final ZigBeeDeserializer deserializer) {
  attributeIdentifier = (int) deserializer.readZigBeeType(ZclDataType.UNSIGNED_16_BIT_INTEGER);
  attributeDataType = ZclDataType.getType((int) deserializer.readZigBeeType(ZclDataType.UNSIGNED_8_BIT_INTEGER));
  attributeValue = deserializer.readZigBeeType(attributeDataType);
}

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

@Override
public void deserialize(final ZigBeeDeserializer deserializer) {
  attributeIdentifier = (int) deserializer.readZigBeeType(ZclDataType.UNSIGNED_16_BIT_INTEGER);
  attributeDataType = ZclDataType.getType((int) deserializer.readZigBeeType(ZclDataType.UNSIGNED_8_BIT_INTEGER));
  attributeValue = deserializer.readZigBeeType(attributeDataType);
}

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

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

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

@Override
public void deserialize(final ZigBeeDeserializer deserializer) {
  attributeIdentifier = (int) deserializer.readZigBeeType(ZclDataType.UNSIGNED_16_BIT_INTEGER);
  status = (ZclStatus) deserializer.readZigBeeType(ZclDataType.ZCL_STATUS);
  if (status.equals(ZclStatus.SUCCESS)) {
    attributeDataType = ZclDataType
        .getType((int) deserializer.readZigBeeType(ZclDataType.UNSIGNED_8_BIT_INTEGER));
    attributeValue = deserializer.readZigBeeType(attributeDataType);
  }
}

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

@Test
public void testDeserialize_ZIGBEE_DATA_TYPE() {
  int[] valIn = { 33 };
  ZclDataType valOut = ZclDataType.getType(valIn[0]);
  testDeserialize(valIn, valOut, ZclDataType.ZIGBEE_DATA_TYPE);
}

代码示例来源:origin: openhab/org.openhab.binding.zigbee

return;
ZclDataType dataType = ZclDataType.getType(dataTypeId);
if (dataType == null) {
  logger.debug("{}: Data type {} not found", node.getIeeeAddress(), dataType);

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

break;
case ZIGBEE_DATA_TYPE:
  value[0] = ZclDataType.getType(payload[index++]);
  break;
case BYTE_ARRAY:

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

@Override
public void deserialize(final ZigBeeDeserializer deserializer) {
  direction = (int) deserializer.readZigBeeType(ZclDataType.UNSIGNED_8_BIT_INTEGER);
  attributeIdentifier = (int) deserializer.readZigBeeType(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.
    timeoutPeriod = (int) deserializer.readZigBeeType(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.
    attributeDataType = ZclDataType
        .getType((int) deserializer.readZigBeeType(ZclDataType.UNSIGNED_8_BIT_INTEGER));
    minimumReportingInterval = (int) deserializer.readZigBeeType(ZclDataType.UNSIGNED_16_BIT_INTEGER);
    maximumReportingInterval = (int) deserializer.readZigBeeType(ZclDataType.UNSIGNED_16_BIT_INTEGER);
    if (attributeDataType.isAnalog()) {
      // 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.
      reportableChange = deserializer.readZigBeeType(attributeDataType);
    }
  }
}

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