gpt4 book ai didi

com.zsmartsystems.zigbee.ZigBeeNode.getBindingTable()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-15 21:13:31 30 4
gpt4 key购买 nike

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

ZigBeeNode.getBindingTable介绍

[英]Gets the current binding table for the device. Note that this doesn't retrieve the table from the device - to do this use the #updateBindingTable() method.
[中]获取设备的当前绑定表。请注意,这不会从设备中检索表——为此,请使用#updateBindingTable()方法。

代码示例

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

@Override
public void process(ZigBeeNetworkManager networkManager, String[] args, PrintStream out)
    throws IllegalArgumentException, InterruptedException, ExecutionException {
  if (args.length != 2) {
    throw new IllegalArgumentException("Invalid number of arguments");
  }
  ZigBeeNode node = getNode(networkManager, args[1]);
  final Boolean result = node.updateBindingTable().get();
  if (!result) {
    out.println("Binding table read error");
    return;
  }
  out.println("Binding table for node " + node.getNetworkAddress() + " [" + node.getIeeeAddress() + "]");
  if (node.getBindingTable().isEmpty()) {
    out.println("--- Empty");
    return;
  }
  out.println("Src Address          | Dest Address         | Group | Mode    | Cluster");
  for (BindingTable entry : node.getBindingTable()) {
    out.println(String
        .format("%s | %20s | %5s | %-7s | %04X:%s", getAddress(entry.getSrcAddr(), entry.getSrcEndpoint()),
            entry.getDstAddrMode() == 3 ? getAddress(entry.getDstNodeAddr(), entry.getDstNodeEndpoint())
                : "",
            entry.getDstAddrMode() == 1 ? Integer.toString(entry.getDstGroupAddr()) : "",
            getAddressMode(entry.getDstAddrMode()), entry.getClusterId(),
            ZclClusterType.getValueById(entry.getClusterId())));
  }
}

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

if (!bindingTable.equals(node.getBindingTable())) {
  updated = true;
  bindingTable.clear();
  bindingTable.addAll(node.getBindingTable());

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