com.zsmartsystems.zigbee.app.discovery.ZigBeeDiscoveryExtension.getNodeDiscoverers()方法的使用及代码示例

x33g5p2x  于2022-02-05 转载在 其他  
字(1.9k)|赞(0)|评价(0)|浏览(130)

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

ZigBeeDiscoveryExtension.getNodeDiscoverers介绍

[英]Gets the Collection of ZigBeeNodeServiceDiscoverers for all nodes
[中]获取所有节点的ZigBeeNodeServiceDiscoveryr集合

代码示例

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

private void outputDiscoveryTasks(ZigBeeDiscoveryExtension extension, PrintStream out) {
  out.println("Mesh update period : " + extension.getUpdatePeriod() + " seconds");
  out.println();
  out.println("Address           Nwk    Last Start            Last Complete         Current Tasks");
  for (ZigBeeNodeServiceDiscoverer discoverer : extension.getNodeDiscoverers()) {
    ZigBeeNode node = discoverer.getNode();
    out.println(String.format("%s  %-5d  %-20s  %-20s  %s", node.getIeeeAddress(), node.getNetworkAddress(),
        discoverer.getLastDiscoveryStarted() == null ? NEVER
            : dfIso8601.format(discoverer.getLastDiscoveryStarted().getTime()),
        discoverer.getLastDiscoveryCompleted() == null ? NEVER
            : dfIso8601.format(discoverer.getLastDiscoveryCompleted().getTime()),
        tasksToString(discoverer.getTasks())));
  }
}

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

private ZigBeeNodeServiceDiscoverer getNodeDiscoverer(ZigBeeDiscoveryExtension extension, IeeeAddress ieeeAddress) {
  for (ZigBeeNodeServiceDiscoverer discoverer : extension.getNodeDiscoverers()) {
    if (discoverer.getNode().getIeeeAddress().equals(ieeeAddress)) {
      return discoverer;
    }
  }
  return null;
}

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

TestUtilities.setField(ZigBeeDiscoveryExtension.class, extension, "nodeDiscovery", nodeDiscovery);
assertEquals(1, extension.getNodeDiscoverers().size());

相关文章