From 7c5a0bdefd27180da32aaaf9b1331c69c66e1693 Mon Sep 17 00:00:00 2001 From: Volker Kaiser Date: Fri, 27 Jul 2012 08:18:30 +0200 Subject: SCHNEIDE-276 --- src/cameras/pylon_camera.cpp | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'src/cameras/pylon_camera.cpp') diff --git a/src/cameras/pylon_camera.cpp b/src/cameras/pylon_camera.cpp index b73bc18..094e3c8 100644 --- a/src/cameras/pylon_camera.cpp +++ b/src/cameras/pylon_camera.cpp @@ -185,6 +185,34 @@ void pylon_camera_set_roi(guint16 roi_x, guint16 roi_y, guint16 roi_width, guint } } +void pylon_camera_get_gain(gint* gain, GError** error) +{ + g_assert(pGrabber); + try + { + yat::Any gain_result; + pGrabber->get_gain(gain_result); + *gain = yat::any_cast(gain_result); + } + catch (const yat::Exception& e) + { + yat_exception_to_gerror(e, error); + } +} + +void pylon_camera_set_gain(gint gain, GError** error) +{ + g_assert(pGrabber); + try + { + pGrabber->set_gain(yat::Any(gain)); + } + catch (const yat::Exception& e) + { + yat_exception_to_gerror(e, error); + } +} + void pylon_camera_start_acquision(GError** error) { g_assert(pGrabber); -- cgit v1.2.3