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