Imaging Control 4 C Library 1.2.0
|
Float properties represent a feature whose value is a floating-point number. More...
Enumerations | |
enum | IC4_PROPERTY_FLOAT_REPRESENTATION { IC4_PROPFLOATREP_LINEAR , IC4_PROPFLOATREP_LOGARITHMIC , IC4_PROPFLOATREP_PURENUMBER } |
Defines the possible float property representations. More... | |
enum | IC4_PROPERTY_DISPLAY_NOTATION { IC4_PROPDISPNOTATION_AUTOMATIC , IC4_PROPDISPNOTATION_FIXED , IC4_PROPDISPNOTATION_SCIENTIFIC } |
Defines the possible float property display notations. More... | |
Functions | |
enum IC4_PROPERTY_FLOAT_REPRESENTATION | ic4_prop_float_get_representation (struct IC4_PROPERTY *prop) |
Returns the suggested represenation for a float property. | |
const char * | ic4_prop_float_get_unit (struct IC4_PROPERTY *prop) |
Returns the unit of a float property. | |
enum IC4_PROPERTY_DISPLAY_NOTATION | ic4_prop_float_get_display_notation (struct IC4_PROPERTY *prop) |
Returns a suggested display notation to use when displaying the float property's value. | |
int64_t | ic4_prop_float_get_display_precision (struct IC4_PROPERTY *prop) |
Returns a suggested number of significant digits to use when displaying the float property's value. | |
bool | ic4_prop_float_set_value (struct IC4_PROPERTY *prop, double value) |
Changes the value of a float property. | |
bool | ic4_prop_float_get_value (struct IC4_PROPERTY *prop, double *pValue) |
Reads the current value of a float property. | |
bool | ic4_prop_float_get_min (struct IC4_PROPERTY *prop, double *pMinimum) |
Returns the minimum value accepted by a float property. | |
bool | ic4_prop_float_get_max (struct IC4_PROPERTY *prop, double *pMaximum) |
Returns the maximum value accepted by a float property. | |
enum IC4_PROPERTY_INCREMENT_MODE | ic4_prop_float_get_inc_mode (struct IC4_PROPERTY *prop) |
Returns how this float property restricts which values are valid between its minimum and maximum value. | |
bool | ic4_prop_float_get_inc (struct IC4_PROPERTY *prop, double *pIncrement) |
Returns the step size for valid values accepted by a float property. | |
bool | ic4_prop_float_get_valid_value_set (struct IC4_PROPERTY *prop, double *value_set, size_t *array_size) |
Returns the set of valid values for a float. | |
Float properties represent a feature whose value is a floating-point number.
Common examples for a float properties are AcquisitionFrameRate
, ExposureTime
or Gain
.
A float property can limit the range of valid values. The range of possible values can be queried by calling ic4_prop_float_get_min() and ic4_prop_float_get_max().
In float property supplies hints that can be useful when creating a user interface:
Defines the possible float property display notations.
Each float property has a display notation hint that can help creating more useful user interfaces.
Defines the possible float property representations.
Each float property has a representation hint that can help creating more useful user interfaces.
Enumerator | |
---|---|
IC4_PROPFLOATREP_LINEAR | Suggest a slider to edit the value. |
IC4_PROPFLOATREP_LOGARITHMIC | Suggest a slider with logarithmic mapping. |
IC4_PROPFLOATREP_PURENUMBER | Suggest displaying a number. |
enum IC4_PROPERTY_DISPLAY_NOTATION ic4_prop_float_get_display_notation | ( | struct IC4_PROPERTY * | prop | ) |
Returns a suggested display notation to use when displaying the float property's value.
[in] | prop | A float property |
prop
is not a float property, the function fails and the error value is set to IC4_ERROR_GENICAM_TYPE_MISMATCH. int64_t ic4_prop_float_get_display_precision | ( | struct IC4_PROPERTY * | prop | ) |
Returns a suggested number of significant digits to use when displaying the float property's value.
[in] | prop | A float property |
prop
is not a float property, the function fails and the error value is set to IC4_ERROR_GENICAM_TYPE_MISMATCH. bool ic4_prop_float_get_inc | ( | struct IC4_PROPERTY * | prop, |
double * | pIncrement | ||
) |
Returns the step size for valid values accepted by a float property.
The increment restricts the set of valid values for a float property. For example, if the property's minimum value is 0.0
, the maximum is 1.0
, and the increment is 0.5
, 1.25
is not a valid value for the property and will be rejected when trying to write it.
[in] | prop | A float property |
[out] | pIncrement | Pointer to a double to receive the increment |
true
on success, otherwise false
.prop
is not a float property, the function fails and the error value is set to IC4_ERROR_GENICAM_TYPE_MISMATCH. enum IC4_PROPERTY_INCREMENT_MODE ic4_prop_float_get_inc_mode | ( | struct IC4_PROPERTY * | prop | ) |
Returns how this float property restricts which values are valid between its minimum and maximum value.
[in] | prop | A float property |
prop
is not a float property, the function fails and the error value is set to IC4_ERROR_GENICAM_TYPE_MISMATCH. bool ic4_prop_float_get_max | ( | struct IC4_PROPERTY * | prop, |
double * | pMaximum | ||
) |
Returns the maximum value accepted by a float property.
[in] | prop | A float property |
[out] | pMaximum | Pointer to an double to receive the maximum value |
true
on success, otherwise false
.prop
is not an float property, the function fails and the error value is set to IC4_ERROR_GENICAM_TYPE_MISMATCH. bool ic4_prop_float_get_min | ( | struct IC4_PROPERTY * | prop, |
double * | pMinimum | ||
) |
Returns the minimum value accepted by a float property.
[in] | prop | A float property |
[out] | pMinimum | Pointer to an double to receive the minimum value |
true
on success, otherwise false
.prop
is not an float property, the function fails and the error value is set to IC4_ERROR_GENICAM_TYPE_MISMATCH. enum IC4_PROPERTY_FLOAT_REPRESENTATION ic4_prop_float_get_representation | ( | struct IC4_PROPERTY * | prop | ) |
Returns the suggested represenation for a float property.
The representation can be used as a hint when creating user interfaces.
[in] | prop | A float property |
prop
is not a float property, the function fails and the error value is set to IC4_ERROR_GENICAM_TYPE_MISMATCH. const char * ic4_prop_float_get_unit | ( | struct IC4_PROPERTY * | prop | ) |
Returns the unit of a float property.
[in] | prop | A float property |
prop
is not a float property, the function fails and the error value is set to IC4_ERROR_GENICAM_TYPE_MISMATCH. bool ic4_prop_float_get_valid_value_set | ( | struct IC4_PROPERTY * | prop, |
double * | value_set, | ||
size_t * | array_size | ||
) |
Returns the set of valid values for a float.
[in] | prop | A float property restricted to a set of values |
[out] | value_set | An array to receive the set of valid values |
[in,out] | array_size | Pointer to a size_t indicating the length of value_set .After the call, this contains the number of entries in this property's set of valid values. |
true
on success, otherwise false
.value_set
is not NULL
and array_size is NULL
, the function fails and the error value is set to IC4_ERROR_INVALID_PARAM_VAL. If *array_size
is lower than the number of entries in this property's set of valid values, the function fails the error value is set to IC4_ERROR_BUFFER_TOO_SMALL. If prop
is not restricted by a set of valid values, the function fails and the error value is set to IC4_ERROR_GENICAM_NOT_IMPLEMENTED. bool ic4_prop_float_get_value | ( | struct IC4_PROPERTY * | prop, |
double * | pValue | ||
) |
Reads the current value of a float property.
[in] | prop | A float property |
[out] | pValue | Pointer to a double to receive the current value |
true
on success, otherwise false
.prop
is not a float property, the function fails and the error value is set to IC4_ERROR_GENICAM_TYPE_MISMATCH. bool ic4_prop_float_set_value | ( | struct IC4_PROPERTY * | prop, |
double | value | ||
) |
Changes the value of a float property.
[in] | prop | A float property |
[in] | value | The new value to set |
true
on success, otherwise false
.prop
is not a float property, the function fails and the error value is set to IC4_ERROR_GENICAM_TYPE_MISMATCH.