本文整理汇总了Python中vimbadll.VimbaDLL.interfacesList方法的典型用法代码示例。如果您正苦于以下问题:Python VimbaDLL.interfacesList方法的具体用法?Python VimbaDLL.interfacesList怎么用?Python VimbaDLL.interfacesList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类vimbadll.VimbaDLL
的用法示例。
在下文中一共展示了VimbaDLL.interfacesList方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _getInterfaceInfos
# 需要导入模块: from vimbadll import VimbaDLL [as 别名]
# 或者: from vimbadll.VimbaDLL import interfacesList [as 别名]
def _getInterfaceInfos(self):
"""
Gets interface info of all available interfaces.
:returns: list -- interface info for available interfaces.
"""
if self._interfaceInfos is None:
# args
dummyInterfaceInfo = structs.VimbaInterfaceInfo()
numFound = c_uint32(-1)
# call once just to get the number of interfaces
# Vimba DLL will return an error code
errorCode = VimbaDLL.interfacesList(byref(dummyInterfaceInfo),
0,
byref(numFound),
sizeof(dummyInterfaceInfo))
if errorCode != 0:
print errorCode
raise VimbaException(errorCode)
numInterfaces = numFound.value
# args
interfaceInfoArray = (structs.VimbaInterfaceInfo * numInterfaces)()
# call again to get the features
# Vimba DLL will return an error code
errorCode = VimbaDLL.interfacesList(interfaceInfoArray,
numInterfaces,
byref(numFound),
sizeof(dummyInterfaceInfo))
if errorCode != 0:
raise VimbaException(errorCode)
self._interfaceInfos = list(
interfaceInfo for interfaceInfo in interfaceInfoArray)
return self._interfaceInfos