本文整理汇总了Python中PyExpLabSys.common.sockets.DateDataPullSocket.daemon方法的典型用法代码示例。如果您正苦于以下问题:Python DateDataPullSocket.daemon方法的具体用法?Python DateDataPullSocket.daemon怎么用?Python DateDataPullSocket.daemon使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PyExpLabSys.common.sockets.DateDataPullSocket
的用法示例。
在下文中一共展示了DateDataPullSocket.daemon方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: DmmReader
# 需要导入模块: from PyExpLabSys.common.sockets import DateDataPullSocket [as 别名]
# 或者: from PyExpLabSys.common.sockets.DateDataPullSocket import daemon [as 别名]
dmm_port = '/dev/serial/by-id/usb-9710_7840-if00-port0'
dmm = keithley2700.Keithley2700('serial', device=dmm_port)
reader = DmmReader(dmm)
reader.daemon = True
reader.start()
codenames = ['omicron_rtd_resistance',]
loggers = {}
for i in range(0, len(codenames)):
loggers[codenames[i]] = ValueLogger(reader, maximumtime=60, comp_type = 'lin', comp_val = 0.1, channel = i)
loggers[codenames[i]].daemon = True
loggers[codenames[i]].start()
socket = DateDataPullSocket('omicron_rtd_resistance',
codenames, port=9001, timeouts=[5.0] * len(codenames))
socket.daemon = True
socket.start()
#db_logger = ContinuousLogger(table='dateplots_omicron',
# username=credentials.user,
# password=credentials.passwd,
# measurement_codenames=codenames)
#db_logger.daemon = True
#db_logger.start()
time.sleep(5)
run = True
while run:
time.sleep(0.25)
try: