当前位置: 首页>>代码示例>>Python>>正文


Python JNTComponent.stop方法代码示例

本文整理汇总了Python中janitoo.component.JNTComponent.stop方法的典型用法代码示例。如果您正苦于以下问题:Python JNTComponent.stop方法的具体用法?Python JNTComponent.stop怎么用?Python JNTComponent.stop使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在janitoo.component.JNTComponent的用法示例。


在下文中一共展示了JNTComponent.stop方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: stop

# 需要导入模块: from janitoo.component import JNTComponent [as 别名]
# 或者: from janitoo.component.JNTComponent import stop [as 别名]
    def stop(self):
        """Stop the component.

        """
        self.stop_check()
        JNTComponent.stop(self)
        return True
开发者ID:bibi21000,项目名称:janitoo_bluez,代码行数:9,代码来源:components.py

示例2: stop

# 需要导入模块: from janitoo.component import JNTComponent [as 别名]
# 或者: from janitoo.component.JNTComponent import stop [as 别名]
 def stop(self):
     """
     """
     self.stop_listen()
     JNTComponent.stop(self)
     if self._bus.spi_locked():
         logger.warning('[%s] - Bus is locked. Close device anyway.', self.__class__.__name__)
         if self.pn532 is not None:
             self.pn532.close()
     self._bus.spi_acquire()
     try:
         self.pn532.close()
     except Exception:
         logger.exception('[%s] - Exception when stopping', self.__class__.__name__)
     finally:
         self.pn532 = None
         self._bus.spi_release()
开发者ID:bibi21000,项目名称:janitoo_raspberry_spi_pn532,代码行数:19,代码来源:pn532.py

示例3: stop

# 需要导入模块: from janitoo.component import JNTComponent [as 别名]
# 或者: from janitoo.component.JNTComponent import stop [as 别名]
 def stop(self):
     """Stop the component.
     """
     if self.mqttc_values is not None:
         try:
             hadd = HADD%(self.remote_hadd[0], self.remote_hadd[1])
             values_read = self.get_read_values()
             topics = []
             for value in values_read:
                 if value[0] == 'user':
                     topic=TOPIC_VALUES_USER
                 else:
                     topic=TOPIC_VALUES_BASIC
                 topic = topic%(HADD%(self.remote_hadd)+'/'+value[1])
                 topics.append(topic)
             logger.debug("[%s] - Unsubscribe to %s", self.__class__.__name__, topics)
             self.mqttc_values.unsubscribe(topics)
             self.mqttc_values.stop()
             if self.mqttc_values.is_alive():
                 self.mqttc_values.join()
             self.mqttc_values = None
         except Exception:
             logger.exception("[%s] - stop", self.__class__.__name__)
     if self.mqttc_heartbeat is not None:
         try:
             hadd = HADD%(self.remote_hadd[0], self.remote_hadd[1])
             logger.debug("[%s] - Unsubscribe to %s", self.__class__.__name__, TOPIC_HEARTBEAT_NODE%(hadd))
             self.mqttc_heartbeat.unsubscribe(topic=TOPIC_HEARTBEAT_NODE%(hadd))
             self.mqttc_heartbeat.stop()
             if self.mqttc_heartbeat.is_alive():
                 self.mqttc_heartbeat.join()
             self.mqttc_heartbeat = None
         except Exception:
             logger.exception("[%s] - stop", self.__class__.__name__)
     JNTComponent.stop(self)
     return True
开发者ID:bibi21000,项目名称:janitoo_factory,代码行数:38,代码来源:remote.py

示例4: stop

# 需要导入模块: from janitoo.component import JNTComponent [as 别名]
# 或者: from janitoo.component.JNTComponent import stop [as 别名]
    def stop(self):
        """Stop the component.

        """
        JNTComponent.stop(self)
        return True
开发者ID:bibi21000,项目名称:janitoo_factory,代码行数:8,代码来源:views.py

示例5: stop

# 需要导入模块: from janitoo.component import JNTComponent [as 别名]
# 或者: from janitoo.component.JNTComponent import stop [as 别名]
 def stop(self):
     """
     """
     JNTComponent.stop(self)
     self.sensor = None
开发者ID:bibi21000,项目名称:janitoo_raspberry_i2c_bmp,代码行数:7,代码来源:bmp.py

示例6: stop

# 需要导入模块: from janitoo.component import JNTComponent [as 别名]
# 或者: from janitoo.component.JNTComponent import stop [as 别名]
 def stop(self):
     """
     """
     JNTComponent.stop(self)
     self.display = None
开发者ID:bibi21000,项目名称:janitoo_raspberry_i2c_ht16k33,代码行数:7,代码来源:ht16k33.py

示例7: stop

# 需要导入模块: from janitoo.component import JNTComponent [as 别名]
# 或者: from janitoo.component.JNTComponent import stop [as 别名]
    def stop(self):
        """Stop the component.

        """
        self._bus.nodeman.remove_daily_job(self.current_rotate)
        return JNTComponent.stop(self)
开发者ID:bibi21000,项目名称:janitoo_events,代码行数:8,代码来源:component.py

示例8: stop

# 需要导入模块: from janitoo.component import JNTComponent [as 别名]
# 或者: from janitoo.component.JNTComponent import stop [as 别名]
 def stop(self):
     """
     """
     JNTComponent.stop(self)
     self.clock = None
开发者ID:bibi21000,项目名称:janitoo_raspberry_i2c_ds1307,代码行数:7,代码来源:ds1307.py


注:本文中的janitoo.component.JNTComponent.stop方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。