本文整理汇总了Python中Phidgets.Devices.InterfaceKit.InterfaceKit.isAttachedToServer方法的典型用法代码示例。如果您正苦于以下问题:Python InterfaceKit.isAttachedToServer方法的具体用法?Python InterfaceKit.isAttachedToServer怎么用?Python InterfaceKit.isAttachedToServer使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Phidgets.Devices.InterfaceKit.InterfaceKit
的用法示例。
在下文中一共展示了InterfaceKit.isAttachedToServer方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: print
# 需要导入模块: from Phidgets.Devices.InterfaceKit import InterfaceKit [as 别名]
# 或者: from Phidgets.Devices.InterfaceKit.InterfaceKit import isAttachedToServer [as 别名]
try:
interfaceKitLCD.setOnErrorhandler(InterfaceKitLCDError)
except PhidgetException as e:
print("Phidget Exception %i: %s" % (e.code, e.details))
print("Exiting....")
exit(1)
#Open the textLCD
try:
interfaceKitLCD.openRemote('odroid',serial=120517)
except PhidgetException as e:
print("Phidget Exception %i: %s" % (e.code, e.details))
print("Exiting....")
exit(1)
if not interfaceKitLCD.isAttachedToServer():
sleep(2)
print('interfaceKitLCD attached to server: %s' % interfaceKitLCD.isAttachedToServer())
#Wait for the device to attach
try:
interfaceKitLCD.waitForAttach(10000)
except PhidgetException as e:
print("Phidget Exception %i: %s" % (e.code, e.details))
try:
interfaceKitLCD.closePhidget()
except PhidgetException as e:
print("Phidget Exception %i: %s" % (e.code, e.details))
print("Exiting....")
exit(1)
开发者ID:AustralianSynchrotron,项目名称:Australian-Synchrotron-Surveyor-Tunnel-Exploration-And-Fault-Detection-Robot,代码行数:33,代码来源:test_srv_relays.py