Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion examples/camera/list_feature_infos.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
with Vimba() as vimba:
camera = vimba.camera(0)
camera.open()

for feature_name in camera.feature_names():
feature = camera.feature(feature_name)
print(feature.info)
Expand Down
10 changes: 10 additions & 0 deletions examples/camera/load_xml_config.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
from pymba import Vimba


if __name__ == '__main__':

with Vimba() as vimba:
camera = vimba.camera(0)
camera.open()
camera.load_config(b'sample_config.xml')
camera.close()
5 changes: 5 additions & 0 deletions pymba/camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,11 @@ def close(self):
if error:
raise VimbaException(error)

def load_config(self, xml_conf_path: str):
error = vimba_c.vmb_camera_load_settings(self._handle, xml_conf_path, None, 0)
if error:
raise VimbaException(error)

def revoke_all_frames(self):
"""
Revoke all frames assigned to the camera.
Expand Down
7 changes: 7 additions & 0 deletions pymba/vimba_c.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,13 @@ class VmbFrame(Structure):
vmb_camera_close.restype = c_int32
vmb_camera_close.argtypes = (c_void_p,)

vmb_camera_load_settings = _vimba_lib.VmbCameraSettingsLoad
vmb_camera_load_settings.restype = c_int32
vmb_camera_load_settings.argtypes = (c_void_p,
c_char_p,
c_void_p,
c_uint32)

vmb_features_list = _vimba_lib.VmbFeaturesList
vmb_features_list.restype = c_int32
vmb_features_list.argtypes = (c_void_p,
Expand Down