From 46db70f569cfc183cfe94c4b9d646a2ce7286baa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Rast?= Date: Wed, 19 Jul 2017 15:18:47 +0200 Subject: Implemented VmbFeatureCommandIsDone --- pymba/vimbadll.py | 7 +++++++ pymba/vimbaobject.py | 12 ++++++++++++ 2 files changed, 19 insertions(+) diff --git a/pymba/vimbadll.py b/pymba/vimbadll.py index 8dd7e81..42add39 100644 --- a/pymba/vimbadll.py +++ b/pymba/vimbadll.py @@ -340,6 +340,13 @@ class VimbaDLL(object): featureCommandRun.argtypes = (c_void_p, # handle for a module that exposes features c_char_p) # name of the command feature + # Check if a feature command is done + featureCommandIsDone = _vimbaDLL.VmbFeatureCommandIsDone + featureCommandIsDone.restype = c_int32 + featureCommandIsDone.argtypes = (c_void_p, # handle + c_char_p, # name of the command feature + POINTER(c_bool)) # pointer to a result bool + # announce frames to the API that may be queued for frame capturing later frameAnnounce = _vimbaDLL.VmbFrameAnnounce frameAnnounce.restype = c_int32 diff --git a/pymba/vimbaobject.py b/pymba/vimbaobject.py index d3ed861..aa617ac 100644 --- a/pymba/vimbaobject.py +++ b/pymba/vimbaobject.py @@ -151,6 +151,18 @@ class VimbaObject(object): if errorCode != 0: raise VimbaException(errorCode) + def featureCommandIsDone(self, featureName): + isDone = c_bool() + errorCode = VimbaDLL.featureCommandIsDone(self._handle, + featureName.encode(), + byref(isDone)) + + if errorCode != 0: + raise VimbaException(errorCode) + + return isDone.value + + def readRegister(self, address): # note that the underlying Vimba function allows reading of an array # of registers, but only one address/value at a time is implemented -- cgit v1.2.3