gpt4 book ai didi

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

转载 作者:知者 更新时间:2024-03-14 12:47:31 28 4
gpt4 key购买 nike

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

ZigBeeChannel介绍

[英]Provides a list of channel mask values used for channel scans.

The 868MHz frequency band has only one channel and is used in Europe with a data rate of 20kbps.

The 915MHz frequency band band has 10 channels ranging from channel-1 to channel-10. It delivers data rate of 40 Kbps and used in Americas. The 2.4GHz frequency band is used worldwide and has total of 16 channels from channel-11 to channel-26 delivering a data rate of 250kbps.

  1. channel-0 868 MHz
  2. channel-1 906 MHz
  3. channel-2 908 MHz
  4. channel-3 910 MHz
  5. channel-4 912 MHz
  6. channel-5 914 MHz
  7. channel-6 916 MHz
  8. channel-7 918 MHz
  9. channel-8 920 MHz
  10. channel-9 922 MHz
  11. channel-10 924 MHz
  12. channel-11 2405 MHz
  13. channel-12 2410 MHz
  14. channel-13 2415 MHz
  15. channel-14 2420 MHz
  16. channel-15 2425 MHz
  17. channel-16 2430 MHz
  18. channel-17 2435 MHz
  19. channel-18 2440 MHz
  20. channel-19 2445 MHz
  21. channel-20 2450 MHz
  22. channel-21 2455 MHz
  23. channel-22 2460 MHz
  24. channel-23 2465 MHz
  25. channel-24 2470 MHz
  26. channel-25 2475 MHz
  27. channel-26 2480 MHz
    [中]提供用于通道扫描的通道掩码值列表。
    868MHz频段只有一个通道,在欧洲使用,数据速率为20kbps。
    915MHz频段有10个通道,范围从通道1到通道10。它提供40 Kbps的数据速率,在美洲使用。2.4GHz频段在全球范围内使用,从通道11到通道26共有16个通道,数据传输速率为250kbps。
    1.信道-0 868 MHz
    1.信道1 906 MHz
    1.信道2 908 MHz
    1.信道3 910 MHz
    1.信道4 912 MHz
    1.信道5 914 MHz
    1.信道6 916 MHz
    1.信道7 918 MHz
    1.信道8 920 MHz
    1.信道9 922 MHz
    1.信道10 924 MHz
    1.信道11 2405 MHz
    1.通道12 2410 MHz
    1.信道13 2415 MHz
    1.信道14 2420 MHz
    1.信道15 2425 MHz
    1.信道16 2430 MHz
    1.通道17 2435 MHz
    1.信道18 2440 MHz
    1.通道19 2445 MHz
    1.通道20 2450 MHz
    1.信道21 2455 MHz
    1.信道22 2460 MHz
    1.信道23 2465 MHz
    1.信道24 2470 MHz
    1.信道25 2475 MHz
    1.信道26 2480 MHz

代码示例

代码示例来源: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 ZigBeeStatus setZigBeeChannel(ZigBeeChannel channel) {
  return networkManager.setZigBeeChannel(channel.getChannel()) ? ZigBeeStatus.SUCCESS : ZigBeeStatus.FAILURE;
}

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

/**
   * Tests of the specified channel number is included in the bitmask
   *
   * @param channel the {@link ZigBeeChannel} number
   * @return true if the mask contains the channel
   */
  public boolean containsChannel(ZigBeeChannel channel) {
    return ((channelMask & channel.getMask()) != 0);
  }
}

代码示例来源: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: openhab/org.openhab.binding.zigbee

networkManager.setZigBeeLinkKey(linkKey);
networkManager.setZigBeeNetworkKey(networkKey);
networkManager.setZigBeeChannel(ZigBeeChannel.create(channelId));
networkManager.setZigBeePanId(panId);
networkManager.setZigBeeExtendedPanId(extendedPanId);
  configuration.put(CONFIGURATION_EXTENDEDPANID, currentExtendedPanId.toString());
configuration.put(CONFIGURATION_CHANNEL, currentChannel.getChannel());

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

/**
   * Lookup function based on the ZigBeeChannel channel number. Returns null
   * if the channel does not exist.
   *
   * @param channel the channel to lookup
   * @return enumeration value of the {@link ZigBeeChannel}.
   */
  public static ZigBeeChannel create(int channel) {
    if (codeMapping == null) {
      initMapping();
    }

    if (codeMapping.get(channel) == null) {
      return UNKNOWN;
    }

    return codeMapping.get(channel);
  }
}

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

builder.append(epan.toString());
builder.append('>');
builder.append(channel.toString());
builder.append('>');
builder.append(networkKey.toString());

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

ZigBeeChannel channel = ZigBeeChannel.valueOf(parameters[4]);
ZigBeeKey networkKey = parseKey(secondsSinceBackup, parameters[5], parameters[6], parameters[7], parameters[8]);
ZigBeeKey linkKey = parseKey(secondsSinceBackup, parameters[9], parameters[10], parameters[11], parameters[12]);

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

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

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

/**
 * Adds a new channel to the channel mask
 *
 * @param channel {@link ZigBeeChannel} to add to the mask
 */
public void addChannel(ZigBeeChannel channel) {
  channelMask |= channel.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());
}

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