gpt4 book ai didi

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

转载 作者:知者 更新时间:2024-03-14 13:53:31 27 4
gpt4 key购买 nike

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

ZigBeeChannel.create介绍

[英]Lookup function based on the ZigBeeChannel channel number. Returns null if the channel does not exist.
[中]基于Zigbee通道号的查找功能。如果通道不存在,则返回null。

代码示例

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

/**
 * Gets the channels in this channel mask
 *
 * return the {@link List} of {@link ZigBeeChannel}s in this mask
 */
public List<ZigBeeChannel> getChannels() {
  List<ZigBeeChannel> channels = new ArrayList<ZigBeeChannel>();
  for (int channelCnt = 0; channelCnt < 32; channelCnt++) {
    if ((channelMask & 1 << channelCnt) == 0) {
      continue;
    }
    ZigBeeChannel channel = ZigBeeChannel.create(channelCnt);
    if (channel != ZigBeeChannel.UNKNOWN) {
      channels.add(channel);
    }
  }
  return channels;
}

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

@Override
public ZigBeeChannel getZigBeeChannel() {
  return ZigBeeChannel.create(networkManager.getCurrentChannel());
}

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

@Test
  public void testChannel() {
    assertEquals(1 << 1, ZigBeeChannel.create(1).getMask());
    assertEquals(ZigBeeChannel.CHANNEL_11, ZigBeeChannel.create(11));
    assertEquals(1 << 11, ZigBeeChannel.create(11).getMask());
  }
}

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

networkManager.setZigBeeChannel(ZigBeeChannel.create(channel));
networkManager.setZigBeePanId(pan);
networkManager.setZigBeeExtendedPanId(extendedPan);

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

@Override
public ZigBeeChannel getZigBeeChannel() {
  ConBeeReadParameterRequest readParameter = new ConBeeReadParameterRequest();
  readParameter.setParameter(ConBeeNetworkParameter.CURRENT_CHANNEL);
  ConBeeReadParameterResponse response = (ConBeeReadParameterResponse) conbeeHandler
      .sendTransaction(new ConBeeSingleResponseTransaction(readParameter, ConBeeReadParameterResponse.class))
      .getResponse();
  return ZigBeeChannel.create((int) response.getValue());
}

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

networkManager.setZigBeeLinkKey(linkKey);
networkManager.setZigBeeNetworkKey(networkKey);
networkManager.setZigBeeChannel(ZigBeeChannel.create(channelId));
networkManager.setZigBeePanId(panId);
networkManager.setZigBeeExtendedPanId(extendedPanId);

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