當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。