gpt4 book ai didi

com.zsmartsystems.zigbee.ZigBeeProfileType类的使用及代码示例

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

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

ZigBeeProfileType介绍

[英]ZigBee Profile Type value enumeration.

Code is auto-generated. Modifications may be overwritten!
[中]ZigBee配置文件类型值枚举。
代码是自动生成的。修改可能会被覆盖!

代码示例

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

@Override
public void process(ZigBeeNetworkManager networkManager, String[] args, PrintStream out)
    throws IllegalArgumentException {
  if (args.length != 2) {
    throw new IllegalArgumentException("Invalid number of arguments");
  }
  final ZigBeeEndpoint endpoint = getEndpoint(networkManager, args[1]);
  ZigBeeProfileType profile = ZigBeeProfileType.getByValue(endpoint.getProfileId());
  ZigBeeDeviceType device = ZigBeeDeviceType.getByValue(endpoint.getDeviceId());
  out.println("IEEE Address     : " + endpoint.getIeeeAddress());
  out.println("Network Address  : " + endpoint.getParentNode().getNetworkAddress());
  out.println("Endpoint         : " + endpoint.getEndpointId());
  out.println("Device Profile   : " + String.format("0x%04X, ", endpoint.getProfileId())
      + (profile == null ? "Unknown" : profile.toString()));
  out.println("Device Type      : " + String.format("0x%04X, ", endpoint.getDeviceId())
      + (device == null ? "Unknown" : device.toString()));
  out.println("Device Version   : " + endpoint.getDeviceVersion());
  out.println("Input Clusters   : (Server)");
  printClusters(endpoint, true, out);
  out.println("Output Clusters  : (Client)");
  printClusters(endpoint, false, out);
}

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

private void outputEndpoint(PrintStream out, ZigBeeEndpoint endpoint) {
    out.println("Profile     " + String.format("%04X ", endpoint.getProfileId())
        + ZigBeeProfileType.getByValue(endpoint.getProfileId()));
    out.println("                 : Device Type " + String.format("%04X ", endpoint.getDeviceId())
        + com.zsmartsystems.zigbee.ZigBeeDeviceType.getByValue(endpoint.getDeviceId()).toString());
    for (Integer clusterId : endpoint.getInputClusterIds()) {
      out.println("                   -> " + ZclClusterType.getValueById(clusterId));
    }
    for (Integer clusterId : endpoint.getOutputClusterIds()) {
      out.println("                   <- " + ZclClusterType.getValueById(clusterId));
    }
  }
}

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

int profileId;
if (properties.get(ZigBeeBindingConstants.CHANNEL_PROPERTY_PROFILEID) == null) {
  profileId = ZigBeeProfileType.ZIGBEE_HOME_AUTOMATION.getKey();
} else {
  profileId = Integer.parseInt(properties.get(ZigBeeBindingConstants.CHANNEL_PROPERTY_PROFILEID));
    endpointId, ZigBeeProfileType.getByValue(profileId));
endpoint = new ZigBeeEndpoint(node, endpointId);
endpoint.setProfileId(profileId);

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

@Test
  public void testTypes() {
    assertEquals(ZigBeeProfileType.ZIGBEE_HOME_AUTOMATION, ZigBeeProfileType.getByValue(0x0104));
    assertEquals(ZigBeeProfileType.ZIGBEE_LIGHT_LINK, ZigBeeProfileType.getByValue(0xC05E));
  }
}

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

ZigBeeEndpoint endpoint = node.getEndpoint(endpointId);
out.println(String.format("%-3d  %-25s  %s", endpoint.getEndpointId(),
    ZigBeeProfileType.getByValue(endpoint.getProfileId()),
    ZigBeeDeviceType.getByValue(endpoint.getDeviceId())));

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