Imaging Control 4 C Library 1.2.0
|
Integer properties represent a feature whose value is an integer number. More...
Enumerations | |
enum | IC4_PROPERTY_INT_REPRESENTATION { IC4_PROPINTREP_LINEAR , IC4_PROPINTREP_LOGARITHMIC , IC4_PROPINTREP_BOOLEAN , IC4_PROPINTREP_PURENUMBER , IC4_PROPINTREP_HEXNUMBER , IC4_PROPINTREP_IPV4ADDRESS , IC4_PROPINTREP_MACADDRESS } |
Defines the possible integer property representations. More... | |
Functions | |
enum IC4_PROPERTY_INT_REPRESENTATION | ic4_prop_integer_get_representation (struct IC4_PROPERTY *prop) |
Returns the suggested representation for an integer property. | |
const char * | ic4_prop_integer_get_unit (struct IC4_PROPERTY *prop) |
Returns the unit of an integer property. | |
bool | ic4_prop_integer_set_value (struct IC4_PROPERTY *prop, int64_t value) |
Changes the value of an integer property. | |
bool | ic4_prop_integer_get_value (struct IC4_PROPERTY *prop, int64_t *pValue) |
Reads the current value of an integer property. | |
bool | ic4_prop_integer_get_min (struct IC4_PROPERTY *prop, int64_t *pMinimum) |
Returns the minimum value accepted by an integer property. | |
bool | ic4_prop_integer_get_max (struct IC4_PROPERTY *prop, int64_t *pMaximum) |
Returns the maximum value accepted by an integer property. | |
bool | ic4_prop_integer_get_inc (struct IC4_PROPERTY *prop, int64_t *pIncrement) |
Returns the step size for valid values accepted by an integer property. | |
enum IC4_PROPERTY_INCREMENT_MODE | ic4_prop_integer_get_inc_mode (struct IC4_PROPERTY *prop) |
Returns how this integer property restricts which values are valid between its minimum and maximum value. | |
bool | ic4_prop_integer_get_valid_value_set (struct IC4_PROPERTY *prop, int64_t *value_set, size_t *array_size) |
Returns the set of valid values for an integer. | |
Integer properties represent a feature whose value is an integer number.
Common examples for a integer properties are Width
or Height
.
An integer property can limit the range of valid values. The range of possible values can be queried by calling ic4_prop_integer_get_min() and ic4_prop_integer_get_max().
In integer property supplies hints that can be useful when creating a user interface:
Defines the possible integer property representations.
Each integer property has a representation hint that can help creating more useful user interfaces.
bool ic4_prop_integer_get_inc | ( | struct IC4_PROPERTY * | prop, |
int64_t * | pIncrement | ||
) |
Returns the step size for valid values accepted by an integer property.
The increment restricts the set of valid values for an integer property. For example, if the property's minimum value is 0
, the maximum is 10
, and the increment is 2
, 5
is not a valid value for the property and will be rejected when trying to write it.
[in] | prop | An integer property |
[out] | pIncrement | Pointer to an integer to receive the increment |
true
on success, otherwise false
.prop
is not an integer property, the function fails and the error value is set to IC4_ERROR_GENICAM_TYPE_MISMATCH. enum IC4_PROPERTY_INCREMENT_MODE ic4_prop_integer_get_inc_mode | ( | struct IC4_PROPERTY * | prop | ) |
Returns how this integer property restricts which values are valid between its minimum and maximum value.
[in] | prop | An integer property |
bool ic4_prop_integer_get_max | ( | struct IC4_PROPERTY * | prop, |
int64_t * | pMaximum | ||
) |
Returns the maximum value accepted by an integer property.
[in] | prop | An integer property |
[out] | pMaximum | Pointer to an integer to receive the maximum value |
true
on success, otherwise false
.prop
is not an integer property, the function fails and the error value is set to IC4_ERROR_GENICAM_TYPE_MISMATCH. bool ic4_prop_integer_get_min | ( | struct IC4_PROPERTY * | prop, |
int64_t * | pMinimum | ||
) |
Returns the minimum value accepted by an integer property.
[in] | prop | An integer property |
[out] | pMinimum | Pointer to an integer to receive the minimum value |
true
on success, otherwise false
.prop
is not an integer property, the function fails and the error value is set to IC4_ERROR_GENICAM_TYPE_MISMATCH. enum IC4_PROPERTY_INT_REPRESENTATION ic4_prop_integer_get_representation | ( | struct IC4_PROPERTY * | prop | ) |
Returns the suggested representation for an integer property.
The representation can be used as a hint when creating user interfaces.
[in] | prop | An integer property |
prop
is not an integer property, the function fails and the error value is set to IC4_ERROR_GENICAM_TYPE_MISMATCH. const char * ic4_prop_integer_get_unit | ( | struct IC4_PROPERTY * | prop | ) |
Returns the unit of an integer property.
[in] | prop | An integer property |
NULL
. Use ic4_get_last_error() to query error information.prop
is not an integer property, the function fails and the error value is set to IC4_ERROR_GENICAM_TYPE_MISMATCH. bool ic4_prop_integer_get_valid_value_set | ( | struct IC4_PROPERTY * | prop, |
int64_t * | value_set, | ||
size_t * | array_size | ||
) |
Returns the set of valid values for an integer.
[in] | prop | An integer 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_integer_get_value | ( | struct IC4_PROPERTY * | prop, |
int64_t * | pValue | ||
) |
Reads the current value of an integer property.
[in] | prop | An integer property |
[out] | pValue | Pointer to an integer to receive the current value |
true
on success, otherwise false
.prop
is not an integer property, the function fails and the error value is set to IC4_ERROR_GENICAM_TYPE_MISMATCH. bool ic4_prop_integer_set_value | ( | struct IC4_PROPERTY * | prop, |
int64_t | value | ||
) |
Changes the value of an integer property.
[in] | prop | An integer property |
[in] | value | The new value to set |
true
on success, otherwise false
.prop
is not an integer property, the function fails and the error value is set to IC4_ERROR_GENICAM_TYPE_MISMATCH.