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


Python SMELLIELogger.notice方法代码示例

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


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

示例1: is_emission_on

# 需要导入模块: from smellie.smellie_logger import SMELLIELogger [as 别名]
# 或者: from smellie.smellie_logger.SMELLIELogger import notice [as 别名]
 def is_emission_on(self):
     """
     Check the status of the SuperK emission.
     
     :returns: True if the emission is on (pulsing or ready to pulse).
     """
     if self.isConnected:
         SMELLIELogger.debug('SNODROP DEBUG: SuperKDriver.is_emission_on()')
         superKStatus = getSuperKStatusBits(self.COMPort)
         if (superKStatus.bit0 == 0):
             emission_on = False
             SMELLIELogger.notice('SNODROP NOTICE: SuperK laser emission OFF.')
         elif (superKStatus.bit0 == 1):
             emission_on = True
             SMELLIELogger.notice('SNODROP NOTICE: SuperK laser emission ON.')
         else:
             SMELLIELogger.warn('SNODROP WARN: Unknown SuperK laser emission state. Check system.')
             raise SuperKDriverLogicError("Unknown response for emission value.")
             emission_on = None
     return emission_on
开发者ID:jlidgard,项目名称:newSmellie,代码行数:22,代码来源:superk_driver.py

示例2: is_laser_locked

# 需要导入模块: from smellie.smellie_logger import SMELLIELogger [as 别名]
# 或者: from smellie.smellie_logger.SMELLIELogger import notice [as 别名]
    def is_laser_locked(self):
        """
        Poll the SuperK driver for its lock status.
        
        :returns: True if the internal-lock is on.
        """
        if self.isConnected:
            SMELLIELogger.debug('SNODROP DEBUG: SuperKDriver.is_laser_locked()')
            
            #interlock circuit
            interlock_locked = self.is_interlock_locked()

            #internal interlock
            superKStatus = getSuperKStatusBits(self.COMPort)
            if (superKStatus.bit1 == 0):
                laser_locked = False
            elif (superKStatus.bit1 == 1):
                laser_locked = True
            else:
                raise SuperKDriverLogicError("Unknown response for interlock value.")
                interlock_locked = None

            #combination of external interlock and SuperK internal interlock
            if (laser_locked or interlock_locked):
                is_locked = True
                SMELLIELogger.notice('SNODROP NOTICE: SuperK laser locked.')
            elif (laser_locked==False and interlock_locked==False):
                is_locked = False
                SMELLIELogger.notice('SNODROP NOTICE: SuperK laser unlocked.')
            else:
                SMELLIELogger.warn('SNODROP WARN: Unknown SuperK laser lock state. Check system.')
                raise SuperKDriverLogicError("Unknown response for interlock value.")
                is_locked = None
            return is_locked
        else:
            raise SuperKDriverLogicError("SuperK port not open.") 
            return None
开发者ID:jlidgard,项目名称:newSmellie,代码行数:39,代码来源:superk_driver.py


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