pylonsrc: extend property ranges for raw values

This commit is contained in:
mrstecklo 2021-02-05 14:50:50 +03:00 committed by joshdoe
parent 48f104dbdb
commit a28d0fd840

View File

@ -191,15 +191,16 @@ typedef enum _GST_PYLONSRC_AUTOFEATURE
G_STATIC_ASSERT ((int) AUTOF_NUM_FEATURES == GST_PYLONSRC_NUM_AUTO_FEATURES); G_STATIC_ASSERT ((int) AUTOF_NUM_FEATURES == GST_PYLONSRC_NUM_AUTO_FEATURES);
G_STATIC_ASSERT ((int) AUTOF_NUM_LIMITED == GST_PYLONSRC_NUM_LIMITED_FEATURES); G_STATIC_ASSERT ((int) AUTOF_NUM_LIMITED == GST_PYLONSRC_NUM_LIMITED_FEATURES);
typedef struct _DemosaicingStrings { typedef struct _DemosaicingStrings
const char* name; {
const char* on; const char *name;
const char* off; const char *on;
const char *off;
} DemosaicingStrings; } DemosaicingStrings;
static const DemosaicingStrings featDemosaicing[2] = { static const DemosaicingStrings featDemosaicing[2] = {
{ "DemosaicingMode", "BaslerPGI", "Simple" }, {"DemosaicingMode", "BaslerPGI", "Simple"},
{ "PgiMode", "On", "Off" } {"PgiMode", "On", "Off"}
}; };
static const char *const featAutoFeature[AUTOF_NUM_FEATURES] = static const char *const featAutoFeature[AUTOF_NUM_FEATURES] =
{ "GainAuto", "ExposureAuto", "BalanceWhiteAuto" }; { "GainAuto", "ExposureAuto", "BalanceWhiteAuto" };
@ -474,62 +475,62 @@ gst_pylonsrc_class_init (GstPylonSrcClass * klass)
g_object_class_install_property (gobject_class, PROP_COLORREDHUE, g_object_class_install_property (gobject_class, PROP_COLORREDHUE,
g_param_spec_double ("colorredhue", "Red's hue", g_param_spec_double ("colorredhue", "Red's hue",
"Specifies the red colour's hue. Note that the this value gets saved on the camera, and running this plugin again without specifying this value will cause the previous value being used. Use the reset parameter or reconnect the camera to reset.", "Specifies the red colour's hue. Note that the this value gets saved on the camera, and running this plugin again without specifying this value will cause the previous value being used. Use the reset parameter or reconnect the camera to reset.",
-4.0, 3.9, DEFAULT_PROP_HUE, -128.0, 127.0, DEFAULT_PROP_HUE,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
g_object_class_install_property (gobject_class, PROP_COLORREDSATURATION, g_object_class_install_property (gobject_class, PROP_COLORREDSATURATION,
g_param_spec_double ("colorredsaturation", "Red's saturation", g_param_spec_double ("colorredsaturation", "Red's saturation",
"Specifies the red colour's saturation. Note that the this value gets saved on the camera, and running this plugin again without specifying this value will cause the previous value being used. Use the reset parameter or reconnect the camera to reset.", "Specifies the red colour's saturation. Note that the this value gets saved on the camera, and running this plugin again without specifying this value will cause the previous value being used. Use the reset parameter or reconnect the camera to reset.",
0.0, 1.9, DEFAULT_PROP_SATURATION, 0.0, 255.0, DEFAULT_PROP_SATURATION,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
g_object_class_install_property (gobject_class, PROP_COLORYELLOWHUE, g_object_class_install_property (gobject_class, PROP_COLORYELLOWHUE,
g_param_spec_double ("coloryellowhue", "Yellow's hue", g_param_spec_double ("coloryellowhue", "Yellow's hue",
"Specifies the yellow colour's hue. Note that the this value gets saved on the camera, and running this plugin again without specifying this value will cause the previous value being used. Use the reset parameter or reconnect the camera to reset.", "Specifies the yellow colour's hue. Note that the this value gets saved on the camera, and running this plugin again without specifying this value will cause the previous value being used. Use the reset parameter or reconnect the camera to reset.",
-4.0, 3.9, DEFAULT_PROP_HUE, -128.0, 127.0, DEFAULT_PROP_HUE,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
g_object_class_install_property (gobject_class, PROP_COLORYELLOWSATURATION, g_object_class_install_property (gobject_class, PROP_COLORYELLOWSATURATION,
g_param_spec_double ("coloryellowsaturation", "Yellow's saturation", g_param_spec_double ("coloryellowsaturation", "Yellow's saturation",
"Specifies the yellow colour's saturation. Note that the this value gets saved on the camera, and running this plugin again without specifying this value will cause the previous value being used. Use the reset parameter or reconnect the camera to reset.", "Specifies the yellow colour's saturation. Note that the this value gets saved on the camera, and running this plugin again without specifying this value will cause the previous value being used. Use the reset parameter or reconnect the camera to reset.",
0.0, 1.9, DEFAULT_PROP_SATURATION, 0.0, 255.0, DEFAULT_PROP_SATURATION,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
g_object_class_install_property (gobject_class, PROP_COLORGREENHUE, g_object_class_install_property (gobject_class, PROP_COLORGREENHUE,
g_param_spec_double ("colorgreenhue", "Green's hue", g_param_spec_double ("colorgreenhue", "Green's hue",
"Specifies the green colour's hue. Note that the this value gets saved on the camera, and running this plugin again without specifying this value will cause the previous value being used. Use the reset parameter or reconnect the camera to reset.", "Specifies the green colour's hue. Note that the this value gets saved on the camera, and running this plugin again without specifying this value will cause the previous value being used. Use the reset parameter or reconnect the camera to reset.",
-4.0, 3.9, DEFAULT_PROP_HUE, -128.0, 127.0, DEFAULT_PROP_HUE,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
g_object_class_install_property (gobject_class, PROP_COLORGREENSATURATION, g_object_class_install_property (gobject_class, PROP_COLORGREENSATURATION,
g_param_spec_double ("colorgreensaturation", "Green's saturation", g_param_spec_double ("colorgreensaturation", "Green's saturation",
"Specifies the green colour's saturation. Note that the this value gets saved on the camera, and running this plugin again without specifying this value will cause the previous value being used. Use the reset parameter or reconnect the camera to reset.", "Specifies the green colour's saturation. Note that the this value gets saved on the camera, and running this plugin again without specifying this value will cause the previous value being used. Use the reset parameter or reconnect the camera to reset.",
0.0, 1.9, DEFAULT_PROP_SATURATION, 0.0, 255.0, DEFAULT_PROP_SATURATION,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
g_object_class_install_property (gobject_class, PROP_COLORCYANHUE, g_object_class_install_property (gobject_class, PROP_COLORCYANHUE,
g_param_spec_double ("colorcyanhue", "Cyan's hue", g_param_spec_double ("colorcyanhue", "Cyan's hue",
"Specifies the cyan colour's hue. Note that the this value gets saved on the camera, and running this plugin again without specifying this value will cause the previous value being used. Use the reset parameter or reconnect the camera to reset.", "Specifies the cyan colour's hue. Note that the this value gets saved on the camera, and running this plugin again without specifying this value will cause the previous value being used. Use the reset parameter or reconnect the camera to reset.",
-4.0, 3.9, DEFAULT_PROP_HUE, -128.0, 127.0, DEFAULT_PROP_HUE,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
g_object_class_install_property (gobject_class, PROP_COLORCYANSATURATION, g_object_class_install_property (gobject_class, PROP_COLORCYANSATURATION,
g_param_spec_double ("colorcyansaturation", "Cyan's saturation", g_param_spec_double ("colorcyansaturation", "Cyan's saturation",
"Specifies the cyan colour's saturation. Note that the this value gets saved on the camera, and running this plugin again without specifying this value will cause the previous value being used. Use the reset parameter or reconnect the camera to reset.", "Specifies the cyan colour's saturation. Note that the this value gets saved on the camera, and running this plugin again without specifying this value will cause the previous value being used. Use the reset parameter or reconnect the camera to reset.",
0.0, 1.9, DEFAULT_PROP_SATURATION, 0.0, 255.0, DEFAULT_PROP_SATURATION,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
g_object_class_install_property (gobject_class, PROP_COLORBLUEHUE, g_object_class_install_property (gobject_class, PROP_COLORBLUEHUE,
g_param_spec_double ("colorbluehue", "Blue's hue", g_param_spec_double ("colorbluehue", "Blue's hue",
"Specifies the blue colour's hue. Note that the this value gets saved on the camera, and running this plugin again without specifying this value will cause the previous value being used. Use the reset parameter or reconnect the camera to reset.", "Specifies the blue colour's hue. Note that the this value gets saved on the camera, and running this plugin again without specifying this value will cause the previous value being used. Use the reset parameter or reconnect the camera to reset.",
-4.0, 3.9, DEFAULT_PROP_HUE, -128.0, 127.0, DEFAULT_PROP_HUE,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
g_object_class_install_property (gobject_class, PROP_COLORBLUESATURATION, g_object_class_install_property (gobject_class, PROP_COLORBLUESATURATION,
g_param_spec_double ("colorbluesaturation", "Blue's saturation", g_param_spec_double ("colorbluesaturation", "Blue's saturation",
"Specifies the blue colour's saturation. Note that the this value gets saved on the camera, and running this plugin again without specifying this value will cause the previous value being used. Use the reset parameter or reconnect the camera to reset.", "Specifies the blue colour's saturation. Note that the this value gets saved on the camera, and running this plugin again without specifying this value will cause the previous value being used. Use the reset parameter or reconnect the camera to reset.",
0.0, 1.9, DEFAULT_PROP_SATURATION, 0.0, 255.0, DEFAULT_PROP_SATURATION,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
g_object_class_install_property (gobject_class, PROP_COLORMAGENTAHUE, g_object_class_install_property (gobject_class, PROP_COLORMAGENTAHUE,
g_param_spec_double ("colormagentahue", "Magenta's hue", g_param_spec_double ("colormagentahue", "Magenta's hue",
"Specifies the magenta colour's hue. Note that the this value gets saved on the camera, and running this plugin again without specifying this value will cause the previous value being used. Use the reset parameter or reconnect the camera to reset.", "Specifies the magenta colour's hue. Note that the this value gets saved on the camera, and running this plugin again without specifying this value will cause the previous value being used. Use the reset parameter or reconnect the camera to reset.",
-4.0, 3.9, DEFAULT_PROP_HUE, -128.0, 127.0, DEFAULT_PROP_HUE,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
g_object_class_install_property (gobject_class, PROP_COLORMAGENTASATURATION, g_object_class_install_property (gobject_class, PROP_COLORMAGENTASATURATION,
g_param_spec_double ("colormagentasaturation", "Magenta's saturation", g_param_spec_double ("colormagentasaturation", "Magenta's saturation",
"Specifies the magenta colour's saturation. Note that the this value gets saved on the camera, and running this plugin again without specifying this value will cause the previous value being used. Use the reset parameter or reconnect the camera to reset.", "Specifies the magenta colour's saturation. Note that the this value gets saved on the camera, and running this plugin again without specifying this value will cause the previous value being used. Use the reset parameter or reconnect the camera to reset.",
0.0, 1.9, DEFAULT_PROP_SATURATION, 0.0, 255.0, DEFAULT_PROP_SATURATION,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
g_object_class_install_property (gobject_class, PROP_COLORADJUSTMENTENABLE, g_object_class_install_property (gobject_class, PROP_COLORADJUSTMENTENABLE,
g_param_spec_boolean ("coloradjustment", "Enable color adjustment", g_param_spec_boolean ("coloradjustment", "Enable color adjustment",
@ -544,12 +545,12 @@ gst_pylonsrc_class_init (GstPylonSrcClass * klass)
g_object_class_install_property (gobject_class, PROP_GAIN, g_object_class_install_property (gobject_class, PROP_GAIN,
g_param_spec_double ("gain", "Gain", g_param_spec_double ("gain", "Gain",
"(dB or raw) Sets the gain added on the camera before sending the frame to the computer. The value of this parameter will be saved to the camera, but it will be set to 0 every time this plugin is launched without specifying gain or overriden if the autogain parameter is set to anything that's not \"off\". Reconnect the camera or use the reset parameter to reset the stored value.", "(dB or raw) Sets the gain added on the camera before sending the frame to the computer. The value of this parameter will be saved to the camera, but it will be set to 0 every time this plugin is launched without specifying gain or overriden if the autogain parameter is set to anything that's not \"off\". Reconnect the camera or use the reset parameter to reset the stored value.",
0.0, 12.0, DEFAULT_PROP_LIMITED_MANUAL, 0.0, 1000.0, DEFAULT_PROP_LIMITED_MANUAL,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
g_object_class_install_property (gobject_class, PROP_BLACKLEVEL, g_object_class_install_property (gobject_class, PROP_BLACKLEVEL,
g_param_spec_double ("blacklevel", "Black Level", g_param_spec_double ("blacklevel", "Black Level",
"(DN) Sets stream's black level. This parameter is processed on the camera before the picture is sent to the computer. The value of this parameter will be saved to the camera, but it will be set to 0 every time this plugin is launched without specifying this parameter. Reconnect the camera or use the reset parameter to reset the stored value.", "(DN) Sets stream's black level. This parameter is processed on the camera before the picture is sent to the computer. The value of this parameter will be saved to the camera, but it will be set to 0 every time this plugin is launched without specifying this parameter. Reconnect the camera or use the reset parameter to reset the stored value.",
0.0, 63.75, DEFAULT_PROP_BLACKLEVEL, 0.0, 1000.0, DEFAULT_PROP_BLACKLEVEL,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
g_object_class_install_property (gobject_class, PROP_GAMMA, g_object_class_install_property (gobject_class, PROP_GAMMA,
g_param_spec_double ("gamma", "Gamma", g_param_spec_double ("gamma", "Gamma",
@ -640,18 +641,18 @@ gst_pylonsrc_class_init (GstPylonSrcClass * klass)
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
g_object_class_install_property (gobject_class, PROP_GAINUPPERLIMIT, g_object_class_install_property (gobject_class, PROP_GAINUPPERLIMIT,
g_param_spec_double ("gainupperlimit", "Auto gain upper limit", g_param_spec_double ("gainupperlimit", "Auto gain upper limit",
"(0-12.00921 dB or raw) Sets the upper limit for the auto gain function.", "(0-1000 dB or raw) Sets the upper limit for the auto gain function.",
0.0, 12.00921, DEFAULT_PROP_GAINUPPERLIMIT, 0.0, 1000.0, DEFAULT_PROP_GAINUPPERLIMIT,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
g_object_class_install_property (gobject_class, PROP_GAINLOWERLIMIT, g_object_class_install_property (gobject_class, PROP_GAINLOWERLIMIT,
g_param_spec_double ("gainlowerlimit", "Auto gain lower limit", g_param_spec_double ("gainlowerlimit", "Auto gain lower limit",
"(0-12.00921 dB or raw) Sets the lower limit for the auto gain function.", "(0-1000 dB or raw) Sets the lower limit for the auto gain function.",
0.0, 12.00921, DEFAULT_PROP_GAINLOWERLIMIT, 0.0, 1000.0, DEFAULT_PROP_GAINLOWERLIMIT,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
g_object_class_install_property (gobject_class, PROP_AUTOBRIGHTNESSTARGET, g_object_class_install_property (gobject_class, PROP_AUTOBRIGHTNESSTARGET,
g_param_spec_double ("autobrightnesstarget", "Auto brightness target", g_param_spec_double ("autobrightnesstarget", "Auto brightness target",
"(0.19608-0.80392 or 50-205) Sets the brightness value the auto exposure/gain function should strive for.", "(0.19608-0.80392 or 50-205) Sets the brightness value the auto exposure/gain function should strive for.",
0.19608, 0.80392, DEFAULT_PROP_AUTOBRIGHTNESSTARGET, 0.19608, 205.0, DEFAULT_PROP_AUTOBRIGHTNESSTARGET,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
g_object_class_install_property (gobject_class, PROP_AUTOPROFILE, g_object_class_install_property (gobject_class, PROP_AUTOPROFILE,
g_param_spec_string ("autoprofile", "Auto function minimize profile", g_param_spec_string ("autoprofile", "Auto function minimize profile",
@ -2084,8 +2085,7 @@ gst_pylonsrc_set_framerate (GstPylonSrc * src)
if (is_prop_implicit (src, PROP_FPS)) { if (is_prop_implicit (src, PROP_FPS)) {
if (is_prop_set (src, PROP_FPS)) { if (is_prop_set (src, PROP_FPS)) {
// apply only if it is set explicitly (default is zero) // apply only if it is set explicitly (default is zero)
const char *fps = const char *fps = feature_alias_available (src, "AcquisitionFrameRate",
feature_alias_available (src, "AcquisitionFrameRate",
"AcquisitionFrameRateAbs"); "AcquisitionFrameRateAbs");
if (fps != NULL) { if (fps != NULL) {
res = PylonDeviceSetFloatFeature (src->deviceHandle, fps, src->fps); res = PylonDeviceSetFloatFeature (src->deviceHandle, fps, src->fps);
@ -2111,8 +2111,7 @@ gst_pylonsrc_set_lightsource (GstPylonSrc * src)
char *original = NULL; char *original = NULL;
if (is_prop_implicit (src, PROP_LIGHTSOURCE)) { if (is_prop_implicit (src, PROP_LIGHTSOURCE)) {
// Set lightsource preset // Set lightsource preset
const char *preset = const char *preset = feature_alias_available (src, "LightSourcePreset",
feature_alias_available (src, "LightSourcePreset",
"LightSourceSelector"); "LightSourceSelector");
if (preset == NULL && feature_available (src, "BslLightSourcePreset")) { if (preset == NULL && feature_available (src, "BslLightSourcePreset")) {
preset = "BslLightSourcePreset"; preset = "BslLightSourcePreset";
@ -2426,8 +2425,7 @@ gst_pylonsrc_set_colour_hue (GstPylonSrc * src, GST_PYLONSRC_COLOUR colour)
selector, featColour[colour]); selector, featColour[colour]);
PYLONC_CHECK_ERROR (src, res); PYLONC_CHECK_ERROR (src, res);
const char *hue = const char *hue = feature_alias_available (src, "ColorAdjustmentHue",
feature_alias_available (src, "ColorAdjustmentHue",
"BslColorAdjustmentHue"); "BslColorAdjustmentHue");
if (hue != NULL) { if (hue != NULL) {
res = res =
@ -2716,7 +2714,8 @@ gst_pylonsrc_set_pgi (GstPylonSrc * src)
{ {
if (is_prop_implicit (src, PROP_BASLERDEMOSAICING)) { if (is_prop_implicit (src, PROP_BASLERDEMOSAICING)) {
const char *demosaicing = const char *demosaicing =
feature_alias_available (src, featDemosaicing[0].name, featDemosaicing[1].name); feature_alias_available (src, featDemosaicing[0].name,
featDemosaicing[1].name);
if (demosaicing != NULL) { if (demosaicing != NULL) {
GENAPIC_RESULT res; GENAPIC_RESULT res;
ptrdiff_t idx = (demosaicing == featDemosaicing[0].name) ? 0 : 1; ptrdiff_t idx = (demosaicing == featDemosaicing[0].name) ? 0 : 1;
@ -2905,8 +2904,7 @@ gst_pylonsrc_configure_start_acquisition (GstPylonSrc * src)
readoutTime); readoutTime);
} }
// Output final frame rate [Hz] // Output final frame rate [Hz]
const char *name = const char *name = feature_alias_available (src, "ResultingFrameRate",
feature_alias_available (src, "ResultingFrameRate",
"ResultingFrameRateAbs"); "ResultingFrameRateAbs");
if (name != NULL) { if (name != NULL) {
double frameRate = 0.0; double frameRate = 0.0;
@ -3439,7 +3437,8 @@ gst_pylonsrc_read_pgi (GstPylonSrc * src)
{ {
if (is_prop_not_set (src, PROP_BASLERDEMOSAICING)) { if (is_prop_not_set (src, PROP_BASLERDEMOSAICING)) {
const char *demosaicing = const char *demosaicing =
feature_alias_readable (src, featDemosaicing[0].name, featDemosaicing[1].name); feature_alias_readable (src, featDemosaicing[0].name,
featDemosaicing[1].name);
if (demosaicing != NULL) { if (demosaicing != NULL) {
const ptrdiff_t idx = (demosaicing == featDemosaicing[0].name) ? 0 : 1; const ptrdiff_t idx = (demosaicing == featDemosaicing[0].name) ? 0 : 1;
const char *pgiOn = featDemosaicing[idx].on; const char *pgiOn = featDemosaicing[idx].on;
@ -3872,12 +3871,11 @@ pylonc_print_camera_info (GstPylonSrc * src, PYLON_DEVICE_HANDLE deviceHandle,
res = res =
PylonDeviceFeatureToString (deviceHandle, "DeviceSerialNumber", serial, PylonDeviceFeatureToString (deviceHandle, "DeviceSerialNumber", serial,
&siz); &siz);
if(siz <= 2 || res != GENAPI_E_OK) { if (siz <= 2 || res != GENAPI_E_OK) {
if(PylonDeviceFeatureIsReadable(deviceHandle, "DeviceID")) { if (PylonDeviceFeatureIsReadable (deviceHandle, "DeviceID")) {
siz = sizeof (serial); siz = sizeof (serial);
res = res =
PylonDeviceFeatureToString (deviceHandle, "DeviceID", serial, PylonDeviceFeatureToString (deviceHandle, "DeviceID", serial, &siz);
&siz);
} else { } else {
serial[0] = '0'; serial[0] = '0';
serial[1] = '\0'; serial[1] = '\0';