本文整理汇总了Python中Phidgets.Devices.InterfaceKit.InterfaceKit.getOutputCount方法的典型用法代码示例。如果您正苦于以下问题:Python InterfaceKit.getOutputCount方法的具体用法?Python InterfaceKit.getOutputCount怎么用?Python InterfaceKit.getOutputCount使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Phidgets.Devices.InterfaceKit.InterfaceKit
的用法示例。
在下文中一共展示了InterfaceKit.getOutputCount方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: SitwPhidgetsKey
# 需要导入模块: from Phidgets.Devices.InterfaceKit import InterfaceKit [as 别名]
# 或者: from Phidgets.Devices.InterfaceKit.InterfaceKit import getOutputCount [as 别名]
#.........这里部分代码省略.........
else:
pass
print('[' + Section + '] ' + Key + ' = ' + val)
continue
except: #IOError
self.prtMsg('Error: readIniFile()')
finally:
pass
def iniData(self):
return (("General",
("KeyCount",
"Sensitivity",
"MovingPace",
"SampleInterval_Key",
"SampleInterval_Env",
"Log_Action",
"Log_Brightness")),)
#Information Display Function
def displayDeviceInfo(self):
print("|------------|----------------------------------|--------------|------------|")
print("|- Attached -|- Type -|- Serial No. -|- Version -|")
print("|------------|----------------------------------|--------------|------------|")
print("|- %8s -|- %30s -|- %10d -|- %8d -|" % (self.interfaceKit.isAttached(), self.interfaceKit.getDeviceName(), self.interfaceKit.getSerialNum(), self.interfaceKit.getDeviceVersion()))
print("|------------|----------------------------------|--------------|------------|")
print("Number of Digital Inputs: %i" % (self.interfaceKit.getInputCount()))
print("Number of Digital Outputs: %i" % (self.interfaceKit.getOutputCount()))
print("Number of Sensor Inputs: %i" % (self.interfaceKit.getSensorCount()))
#Event Handler Callback Functions
def inferfaceKitAttached(self, e):
attached = e.device
print("InterfaceKit %i Attached!" % (attached.getSerialNum()))
def interfaceKitDetached(self, e):
detached = e.device
print("InterfaceKit %i Detached!" % (detached.getSerialNum()))
def interfaceKitError(self, e):
try:
source = e.device
print("InterfaceKit %i: Phidget Error %i: %s" % (source.getSerialNum(), e.eCode, e.description))
except PhidgetException as e:
print("Phidget Exception %i: %s" % (e.code, e.details))
def interfaceKitInputChanged(self, e):
source = e.device
print("InterfaceKit %i: Input %i: %s" % (source.getSerialNum(), e.index, e.state))
def interfaceKitSensorChanged(self, e):
if not self.KeyMatReady:
return
#source = e.device