gpt4 book ai didi

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

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

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

ZigBeeDiscoveryExtension.stopScheduler介绍

暂无

代码示例

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

protected void startScheduler(int initialPeriod) {
  stopScheduler();
  Runnable meshUpdateThread = new Runnable() {
    @Override
    public void run() {
      logger.debug("DISCOVERY Extension: Starting mesh update");
      for (ZigBeeNodeServiceDiscoverer node : nodeDiscovery.values()) {
        logger.debug("DISCOVERY Extension: Starting mesh update for {}", node.getNode().getIeeeAddress());
        node.updateMesh();
      }
    }
  };
  futureTask = networkManager.scheduleTask(meshUpdateThread, initialPeriod, updatePeriod * 1000);
}

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

/**
 * Sets the update period for the mesh update service. This is the number of seconds between
 * subsequent mesh updates. Setting the period to 0 will disable mesh updates.
 *
 * @param updatePeriod number of seconds between mesh updates. Setting to 0 will stop updates.
 */
public void setUpdatePeriod(final int updatePeriod) {
  this.updatePeriod = updatePeriod;
  if (!extensionStarted) {
    return;
  }
  logger.debug("DISCOVERY Extension: Set mesh update interval to {} seconds", updatePeriod);
  if (updatePeriod == 0) {
    stopScheduler();
    return;
  }
  startScheduler(updatePeriod);
}

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

Mockito.verify(extension, Mockito.times(1)).stopScheduler();
assertEquals(0, extension.getUpdatePeriod());

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