本文整理汇总了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
示例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