Enumeration Properties
Enumeration properties represent a feature whose value is selected from a list of named entries. More...
Functions
bool | ic4_prop_enum_get_entries (struct IC4_PROPERTY *prop, struct IC4_PROPERTY_LIST **ppList) Returns the list of entries in this enumeration property. |
bool | ic4_prop_enum_find_entry_by_name (struct IC4_PROPERTY *prop, const char *entry_name, struct IC4_PROPERTY **ppEntry) Finds the enumeration entry with a given name in this enumeration property. |
bool | ic4_prop_enum_find_entry_by_value (struct IC4_PROPERTY *prop, int64_t entry_value, struct IC4_PROPERTY **ppEntry) Finds the enumeration entry with a given value in this enumeration property. |
bool | ic4_prop_enum_set_value (struct IC4_PROPERTY *prop, const char *entry_name) Sets the enumeration's selected entry by name. |
const char * | ic4_prop_enum_get_value (struct IC4_PROPERTY *prop) Returns the name of the currently selected entry of the enumeration. |
bool | ic4_prop_enum_set_selected_entry (struct IC4_PROPERTY *prop, struct IC4_PROPERTY *entry) Sets the enumeration's selected entry. |
bool | ic4_prop_enum_get_selected_entry (struct IC4_PROPERTY *prop, struct IC4_PROPERTY **ppEntry) Returns the currently selected entry of this enumeration property. |
bool | ic4_prop_enum_set_int_value (struct IC4_PROPERTY *prop, int64_t entry_value) Selects the currently selected entry of this enumeration property by specifying the entry's value. |
bool | ic4_prop_enum_get_int_value (struct IC4_PROPERTY *prop, int64_t *pValue) Returns the value of the currently selected entry of an enumeration property. |
bool | ic4_prop_enumentry_get_int_value (struct IC4_PROPERTY *prop, int64_t *pValue) Returns the value of an enumeration entry. |
Detailed Description
Enumeration properties represent a feature whose value is selected from a list of named entries.
Common examples for an enumeration properties are PixelFormat
, TriggerMode
or ExposureAuto
.
The value of an enumeration property can be get or set by both a enumeration entry's name or value.
Enumeration entries are represented by IC4_PROPERTY objects; a call to ic4_prop_enum_get_entries() returns the list of possible enumeration entries as a IC4_PROPERTY_LIST.
Function Documentation
◆ ic4_prop_enum_find_entry_by_name()
bool ic4_prop_enum_find_entry_by_name
(
struct IC4_PROPERTY *
prop,
const char *
entry_name,
struct IC4_PROPERTY **
ppEntry
)
Finds the enumeration entry with a given name in this enumeration property.
- Parameters
-
[in] prop An enumeration property
[in] entry_name The name of one of this enumeration property's enumeration entries
[out] ppEntry A pointer to a property receiving the requested enumeration entry.
When the enumeration entry is no longer required, release the object reference using ic4_prop_unref().
- Returns
true
on success, otherwise false
.
Use ic4_get_last_error() to query error information.
- Remarks
- If
prop
is not an enumeration property, the function fails and the error value is set to IC4_ERROR_GENICAM_TYPE_MISMATCH.
◆ ic4_prop_enum_find_entry_by_value()
bool ic4_prop_enum_find_entry_by_value
(
struct IC4_PROPERTY *
prop,
int64_t
entry_value,
struct IC4_PROPERTY **
ppEntry
)
Finds the enumeration entry with a given value in this enumeration property.
- Parameters
-
[in] prop An enumeration property
[in] entry_value The value of one of this enumeration property's enumeration entries
[out] ppEntry A pointer to a property receiving the requested enumeration entry.
When the enumeration entry is no longer required, release the object reference using ic4_prop_unref().
- Returns
true
on success, otherwise false
.
Use ic4_get_last_error() to query error information.
- Remarks
- If
prop
is not an enumeration property, the function fails and the error value is set to IC4_ERROR_GENICAM_TYPE_MISMATCH.
- See also
- ic4_prop_enum_find_entry_by_name
◆ ic4_prop_enum_get_entries()
bool ic4_prop_enum_get_entries
(
struct IC4_PROPERTY *
prop,
struct IC4_PROPERTY_LIST **
ppList
)
Returns the list of entries in this enumeration property.
- Parameters
-
[in] prop An enumeration property
[out] ppList A pointer to a property list receiving the list of enumeration entries.
When the property list is no longer required, release the object reference using ic4_proplist_unref().
- Returns
true
on success, otherwise false
.
Use ic4_get_last_error() to query error information.
- Remarks
- If
prop
is not an enumeration property, the function fails and the error value is set to IC4_ERROR_GENICAM_TYPE_MISMATCH.
◆ ic4_prop_enum_get_int_value()
bool ic4_prop_enum_get_int_value
(
struct IC4_PROPERTY *
prop,
int64_t *
pValue
)
Returns the value of the currently selected entry of an enumeration property.
- Parameters
-
[in] prop An enumeration property
[out] pValue A pointer to a double receiving the currently selected enumeration entry's value
- Returns
true
on success, otherwise false
.
Use ic4_get_last_error() to query error information.
- Remarks
- If
prop
is not an enumeration property, the function fails and the error value is set to IC4_ERROR_GENICAM_TYPE_MISMATCH.
◆ ic4_prop_enum_get_selected_entry()
bool ic4_prop_enum_get_selected_entry
(
struct IC4_PROPERTY *
prop,
struct IC4_PROPERTY **
ppEntry
)
Returns the currently selected entry of this enumeration property.
- Parameters
-
[in] prop An enumeration property
[out] ppEntry A pointer to a property receiving the currently selected enumeration entry.
When the enumeration entry is no longer required, release the object reference using ic4_prop_unref().
- Returns
true
on success, otherwise false
.
Use ic4_get_last_error() to query error information.
- Remarks
- If
prop
is not an enumeration property, the function fails and the error value is set to IC4_ERROR_GENICAM_TYPE_MISMATCH.
- See also
- ic4_prop_enum_get_int_value
◆ ic4_prop_enum_get_value()
const char * ic4_prop_enum_get_value
(
struct IC4_PROPERTY *
prop )
Returns the name of the currently selected entry of the enumeration.
- Parameters
-
prop An enumeration property
- Returns
- The name of the enumeration's currently selected entry, or
NULL
in case of an error.
Use ic4_get_last_error() to query error information.
The memory pointed to by the return value is valid at least as the property object exists, or until the next call to ic4_prop_enum_get_value
on this enumeration.
- Remarks
- If
prop
is not an enumeration property, the function fails and the error value is set to IC4_ERROR_GENICAM_TYPE_MISMATCH.
◆ ic4_prop_enum_set_int_value()
bool ic4_prop_enum_set_int_value
(
struct IC4_PROPERTY *
prop,
int64_t
entry_value
)
Selects the currently selected entry of this enumeration property by specifying the entry's value.
This method can be useful to directly set a known enumeration entry, for example setting the PixelFormat
to IC4_PIXEL_FORMAT_Mono8.
- Parameters
-
[in] prop An enumeration property
[in] entry_value The value of an enumeration entry of prop
.
- Returns
true
on success, otherwise false
.
Use ic4_get_last_error() to query error information.
- Remarks
- If
prop
is not an enumeration property, the function fails and the error value is set to IC4_ERROR_GENICAM_TYPE_MISMATCH.
◆ ic4_prop_enum_set_selected_entry()
bool ic4_prop_enum_set_selected_entry
(
struct IC4_PROPERTY *
prop,
struct IC4_PROPERTY *
entry
)
Sets the enumeration's selected entry.
- Parameters
-
[in] prop An enumeration property
[in] entry An enumeration entry of prop
.
- Returns
true
on success, otherwise false
.
Use ic4_get_last_error() to query error information.
- Remarks
- If
prop
is not an enumeration property, the function fails and the error value is set to IC4_ERROR_GENICAM_TYPE_MISMATCH.
If entry
is not an enumeration entry property, the function fails and the error value is set to IC4_ERROR_GENICAM_TYPE_MISMATCH.
If entry
is not an enumeration entry of prop
, the function fails and the error value is set to IC4_ERROR_GENICAM_VALUE_ERROR.
◆ ic4_prop_enum_set_value()
bool ic4_prop_enum_set_value
(
struct IC4_PROPERTY *
prop,
const char *
entry_name
)
Sets the enumeration's selected entry by name.
- Parameters
-
[in] prop An enumeration property
[in] entry_name The name of an enumeration entry of prop
.
- Returns
true
on success, otherwise false
.
Use ic4_get_last_error() to query error information.
- Remarks
- If
prop
is not an enumeration property, the function fails and the error value is set to IC4_ERROR_GENICAM_TYPE_MISMATCH.
If entry_name
is not the name of an entry of prop
, the function fails and the error value is set to IC4_ERROR_GENICAM_VALUE_ERROR.
◆ ic4_prop_enumentry_get_int_value()
bool ic4_prop_enumentry_get_int_value
(
struct IC4_PROPERTY *
prop,
int64_t *
pValue
)
Returns the value of an enumeration entry.
- Parameters
-
[in] prop An enumeration entry
[out] pValue A pointer to a double receiving the value of the enumeration entry
- Returns
true
on success, otherwise false
.
Use ic4_get_last_error() to query error information.
- Remarks
- If
prop
is not an enumeration entry, the function fails and the error value is set to IC4_ERROR_GENICAM_TYPE_MISMATCH.
- See also
- ic4_prop_enum_get_entries
bool ic4_prop_enum_find_entry_by_name | ( | struct IC4_PROPERTY * | prop, |
const char * | entry_name, | ||
struct IC4_PROPERTY ** | ppEntry | ||
) |
Finds the enumeration entry with a given name in this enumeration property.
- Parameters
-
[in] prop An enumeration property [in] entry_name The name of one of this enumeration property's enumeration entries [out] ppEntry A pointer to a property receiving the requested enumeration entry.
When the enumeration entry is no longer required, release the object reference using ic4_prop_unref().
- Returns
true
on success, otherwisefalse
.
Use ic4_get_last_error() to query error information.
- Remarks
- If
prop
is not an enumeration property, the function fails and the error value is set to IC4_ERROR_GENICAM_TYPE_MISMATCH.
bool ic4_prop_enum_find_entry_by_value | ( | struct IC4_PROPERTY * | prop, |
int64_t | entry_value, | ||
struct IC4_PROPERTY ** | ppEntry | ||
) |
Finds the enumeration entry with a given value in this enumeration property.
- Parameters
-
[in] prop An enumeration property [in] entry_value The value of one of this enumeration property's enumeration entries [out] ppEntry A pointer to a property receiving the requested enumeration entry.
When the enumeration entry is no longer required, release the object reference using ic4_prop_unref().
- Returns
true
on success, otherwisefalse
.
Use ic4_get_last_error() to query error information.
- Remarks
- If
prop
is not an enumeration property, the function fails and the error value is set to IC4_ERROR_GENICAM_TYPE_MISMATCH.
- See also
- ic4_prop_enum_find_entry_by_name
◆ ic4_prop_enum_get_entries()
bool ic4_prop_enum_get_entries
(
struct IC4_PROPERTY *
prop,
struct IC4_PROPERTY_LIST **
ppList
)
Returns the list of entries in this enumeration property.
- Parameters
-
[in] prop An enumeration property
[out] ppList A pointer to a property list receiving the list of enumeration entries.
When the property list is no longer required, release the object reference using ic4_proplist_unref().
- Returns
true
on success, otherwise false
.
Use ic4_get_last_error() to query error information.
- Remarks
- If
prop
is not an enumeration property, the function fails and the error value is set to IC4_ERROR_GENICAM_TYPE_MISMATCH.
◆ ic4_prop_enum_get_int_value()
bool ic4_prop_enum_get_int_value
(
struct IC4_PROPERTY *
prop,
int64_t *
pValue
)
Returns the value of the currently selected entry of an enumeration property.
- Parameters
-
[in] prop An enumeration property
[out] pValue A pointer to a double receiving the currently selected enumeration entry's value
- Returns
true
on success, otherwise false
.
Use ic4_get_last_error() to query error information.
- Remarks
- If
prop
is not an enumeration property, the function fails and the error value is set to IC4_ERROR_GENICAM_TYPE_MISMATCH.
◆ ic4_prop_enum_get_selected_entry()
bool ic4_prop_enum_get_selected_entry
(
struct IC4_PROPERTY *
prop,
struct IC4_PROPERTY **
ppEntry
)
Returns the currently selected entry of this enumeration property.
- Parameters
-
[in] prop An enumeration property
[out] ppEntry A pointer to a property receiving the currently selected enumeration entry.
When the enumeration entry is no longer required, release the object reference using ic4_prop_unref().
- Returns
true
on success, otherwise false
.
Use ic4_get_last_error() to query error information.
- Remarks
- If
prop
is not an enumeration property, the function fails and the error value is set to IC4_ERROR_GENICAM_TYPE_MISMATCH.
- See also
- ic4_prop_enum_get_int_value
◆ ic4_prop_enum_get_value()
const char * ic4_prop_enum_get_value
(
struct IC4_PROPERTY *
prop )
Returns the name of the currently selected entry of the enumeration.
- Parameters
-
prop An enumeration property
- Returns
- The name of the enumeration's currently selected entry, or
NULL
in case of an error.
Use ic4_get_last_error() to query error information.
The memory pointed to by the return value is valid at least as the property object exists, or until the next call to ic4_prop_enum_get_value
on this enumeration.
- Remarks
- If
prop
is not an enumeration property, the function fails and the error value is set to IC4_ERROR_GENICAM_TYPE_MISMATCH.
◆ ic4_prop_enum_set_int_value()
bool ic4_prop_enum_set_int_value
(
struct IC4_PROPERTY *
prop,
int64_t
entry_value
)
Selects the currently selected entry of this enumeration property by specifying the entry's value.
This method can be useful to directly set a known enumeration entry, for example setting the PixelFormat
to IC4_PIXEL_FORMAT_Mono8.
- Parameters
-
[in] prop An enumeration property
[in] entry_value The value of an enumeration entry of prop
.
- Returns
true
on success, otherwise false
.
Use ic4_get_last_error() to query error information.
- Remarks
- If
prop
is not an enumeration property, the function fails and the error value is set to IC4_ERROR_GENICAM_TYPE_MISMATCH.
◆ ic4_prop_enum_set_selected_entry()
bool ic4_prop_enum_set_selected_entry
(
struct IC4_PROPERTY *
prop,
struct IC4_PROPERTY *
entry
)
Sets the enumeration's selected entry.
- Parameters
-
[in] prop An enumeration property
[in] entry An enumeration entry of prop
.
- Returns
true
on success, otherwise false
.
Use ic4_get_last_error() to query error information.
- Remarks
- If
prop
is not an enumeration property, the function fails and the error value is set to IC4_ERROR_GENICAM_TYPE_MISMATCH.
If entry
is not an enumeration entry property, the function fails and the error value is set to IC4_ERROR_GENICAM_TYPE_MISMATCH.
If entry
is not an enumeration entry of prop
, the function fails and the error value is set to IC4_ERROR_GENICAM_VALUE_ERROR.
◆ ic4_prop_enum_set_value()
bool ic4_prop_enum_set_value
(
struct IC4_PROPERTY *
prop,
const char *
entry_name
)
Sets the enumeration's selected entry by name.
- Parameters
-
[in] prop An enumeration property
[in] entry_name The name of an enumeration entry of prop
.
- Returns
true
on success, otherwise false
.
Use ic4_get_last_error() to query error information.
- Remarks
- If
prop
is not an enumeration property, the function fails and the error value is set to IC4_ERROR_GENICAM_TYPE_MISMATCH.
If entry_name
is not the name of an entry of prop
, the function fails and the error value is set to IC4_ERROR_GENICAM_VALUE_ERROR.
◆ ic4_prop_enumentry_get_int_value()
bool ic4_prop_enumentry_get_int_value
(
struct IC4_PROPERTY *
prop,
int64_t *
pValue
)
Returns the value of an enumeration entry.
- Parameters
-
[in] prop An enumeration entry
[out] pValue A pointer to a double receiving the value of the enumeration entry
- Returns
true
on success, otherwise false
.
Use ic4_get_last_error() to query error information.
- Remarks
- If
prop
is not an enumeration entry, the function fails and the error value is set to IC4_ERROR_GENICAM_TYPE_MISMATCH.
- See also
- ic4_prop_enum_get_entries
bool ic4_prop_enum_get_entries | ( | struct IC4_PROPERTY * | prop, |
struct IC4_PROPERTY_LIST ** | ppList | ||
) |
Returns the list of entries in this enumeration property.
- Parameters
-
[in] prop An enumeration property [out] ppList A pointer to a property list receiving the list of enumeration entries.
When the property list is no longer required, release the object reference using ic4_proplist_unref().
- Returns
true
on success, otherwisefalse
.
Use ic4_get_last_error() to query error information.
- Remarks
- If
prop
is not an enumeration property, the function fails and the error value is set to IC4_ERROR_GENICAM_TYPE_MISMATCH.
bool ic4_prop_enum_get_int_value | ( | struct IC4_PROPERTY * | prop, |
int64_t * | pValue | ||
) |
Returns the value of the currently selected entry of an enumeration property.
- Parameters
-
[in] prop An enumeration property [out] pValue A pointer to a double receiving the currently selected enumeration entry's value
- Returns
true
on success, otherwisefalse
.
Use ic4_get_last_error() to query error information.
- Remarks
- If
prop
is not an enumeration property, the function fails and the error value is set to IC4_ERROR_GENICAM_TYPE_MISMATCH.
◆ ic4_prop_enum_get_selected_entry()
bool ic4_prop_enum_get_selected_entry
(
struct IC4_PROPERTY *
prop,
struct IC4_PROPERTY **
ppEntry
)
Returns the currently selected entry of this enumeration property.
- Parameters
-
[in] prop An enumeration property
[out] ppEntry A pointer to a property receiving the currently selected enumeration entry.
When the enumeration entry is no longer required, release the object reference using ic4_prop_unref().
- Returns
true
on success, otherwise false
.
Use ic4_get_last_error() to query error information.
- Remarks
- If
prop
is not an enumeration property, the function fails and the error value is set to IC4_ERROR_GENICAM_TYPE_MISMATCH.
- See also
- ic4_prop_enum_get_int_value
◆ ic4_prop_enum_get_value()
const char * ic4_prop_enum_get_value
(
struct IC4_PROPERTY *
prop )
Returns the name of the currently selected entry of the enumeration.
- Parameters
-
prop An enumeration property
- Returns
- The name of the enumeration's currently selected entry, or
NULL
in case of an error.
Use ic4_get_last_error() to query error information.
The memory pointed to by the return value is valid at least as the property object exists, or until the next call to ic4_prop_enum_get_value
on this enumeration.
- Remarks
- If
prop
is not an enumeration property, the function fails and the error value is set to IC4_ERROR_GENICAM_TYPE_MISMATCH.
◆ ic4_prop_enum_set_int_value()
bool ic4_prop_enum_set_int_value
(
struct IC4_PROPERTY *
prop,
int64_t
entry_value
)
Selects the currently selected entry of this enumeration property by specifying the entry's value.
This method can be useful to directly set a known enumeration entry, for example setting the PixelFormat
to IC4_PIXEL_FORMAT_Mono8.
- Parameters
-
[in] prop An enumeration property
[in] entry_value The value of an enumeration entry of prop
.
- Returns
true
on success, otherwise false
.
Use ic4_get_last_error() to query error information.
- Remarks
- If
prop
is not an enumeration property, the function fails and the error value is set to IC4_ERROR_GENICAM_TYPE_MISMATCH.
◆ ic4_prop_enum_set_selected_entry()
bool ic4_prop_enum_set_selected_entry
(
struct IC4_PROPERTY *
prop,
struct IC4_PROPERTY *
entry
)
Sets the enumeration's selected entry.
- Parameters
-
[in] prop An enumeration property
[in] entry An enumeration entry of prop
.
- Returns
true
on success, otherwise false
.
Use ic4_get_last_error() to query error information.
- Remarks
- If
prop
is not an enumeration property, the function fails and the error value is set to IC4_ERROR_GENICAM_TYPE_MISMATCH.
If entry
is not an enumeration entry property, the function fails and the error value is set to IC4_ERROR_GENICAM_TYPE_MISMATCH.
If entry
is not an enumeration entry of prop
, the function fails and the error value is set to IC4_ERROR_GENICAM_VALUE_ERROR.
◆ ic4_prop_enum_set_value()
bool ic4_prop_enum_set_value
(
struct IC4_PROPERTY *
prop,
const char *
entry_name
)
Sets the enumeration's selected entry by name.
- Parameters
-
[in] prop An enumeration property
[in] entry_name The name of an enumeration entry of prop
.
- Returns
true
on success, otherwise false
.
Use ic4_get_last_error() to query error information.
- Remarks
- If
prop
is not an enumeration property, the function fails and the error value is set to IC4_ERROR_GENICAM_TYPE_MISMATCH.
If entry_name
is not the name of an entry of prop
, the function fails and the error value is set to IC4_ERROR_GENICAM_VALUE_ERROR.
◆ ic4_prop_enumentry_get_int_value()
bool ic4_prop_enumentry_get_int_value
(
struct IC4_PROPERTY *
prop,
int64_t *
pValue
)
Returns the value of an enumeration entry.
- Parameters
-
[in] prop An enumeration entry
[out] pValue A pointer to a double receiving the value of the enumeration entry
- Returns
true
on success, otherwise false
.
Use ic4_get_last_error() to query error information.
- Remarks
- If
prop
is not an enumeration entry, the function fails and the error value is set to IC4_ERROR_GENICAM_TYPE_MISMATCH.
- See also
- ic4_prop_enum_get_entries
bool ic4_prop_enum_get_selected_entry | ( | struct IC4_PROPERTY * | prop, |
struct IC4_PROPERTY ** | ppEntry | ||
) |
Returns the currently selected entry of this enumeration property.
- Parameters
-
[in] prop An enumeration property [out] ppEntry A pointer to a property receiving the currently selected enumeration entry.
When the enumeration entry is no longer required, release the object reference using ic4_prop_unref().
- Returns
true
on success, otherwisefalse
.
Use ic4_get_last_error() to query error information.
- Remarks
- If
prop
is not an enumeration property, the function fails and the error value is set to IC4_ERROR_GENICAM_TYPE_MISMATCH.
- See also
- ic4_prop_enum_get_int_value
const char * ic4_prop_enum_get_value | ( | struct IC4_PROPERTY * | prop | ) |
Returns the name of the currently selected entry of the enumeration.
- Parameters
-
prop An enumeration property
- Returns
- The name of the enumeration's currently selected entry, or
NULL
in case of an error.
Use ic4_get_last_error() to query error information.
The memory pointed to by the return value is valid at least as the property object exists, or until the next call toic4_prop_enum_get_value
on this enumeration.
- Remarks
- If
prop
is not an enumeration property, the function fails and the error value is set to IC4_ERROR_GENICAM_TYPE_MISMATCH.
◆ ic4_prop_enum_set_int_value()
bool ic4_prop_enum_set_int_value
(
struct IC4_PROPERTY *
prop,
int64_t
entry_value
)
Selects the currently selected entry of this enumeration property by specifying the entry's value.
This method can be useful to directly set a known enumeration entry, for example setting the PixelFormat
to IC4_PIXEL_FORMAT_Mono8.
- Parameters
-
[in] prop An enumeration property
[in] entry_value The value of an enumeration entry of prop
.
- Returns
true
on success, otherwise false
.
Use ic4_get_last_error() to query error information.
- Remarks
- If
prop
is not an enumeration property, the function fails and the error value is set to IC4_ERROR_GENICAM_TYPE_MISMATCH.
◆ ic4_prop_enum_set_selected_entry()
bool ic4_prop_enum_set_selected_entry
(
struct IC4_PROPERTY *
prop,
struct IC4_PROPERTY *
entry
)
Sets the enumeration's selected entry.
- Parameters
-
[in] prop An enumeration property
[in] entry An enumeration entry of prop
.
- Returns
true
on success, otherwise false
.
Use ic4_get_last_error() to query error information.
- Remarks
- If
prop
is not an enumeration property, the function fails and the error value is set to IC4_ERROR_GENICAM_TYPE_MISMATCH.
If entry
is not an enumeration entry property, the function fails and the error value is set to IC4_ERROR_GENICAM_TYPE_MISMATCH.
If entry
is not an enumeration entry of prop
, the function fails and the error value is set to IC4_ERROR_GENICAM_VALUE_ERROR.
◆ ic4_prop_enum_set_value()
bool ic4_prop_enum_set_value
(
struct IC4_PROPERTY *
prop,
const char *
entry_name
)
Sets the enumeration's selected entry by name.
- Parameters
-
[in] prop An enumeration property
[in] entry_name The name of an enumeration entry of prop
.
- Returns
true
on success, otherwise false
.
Use ic4_get_last_error() to query error information.
- Remarks
- If
prop
is not an enumeration property, the function fails and the error value is set to IC4_ERROR_GENICAM_TYPE_MISMATCH.
If entry_name
is not the name of an entry of prop
, the function fails and the error value is set to IC4_ERROR_GENICAM_VALUE_ERROR.
◆ ic4_prop_enumentry_get_int_value()
bool ic4_prop_enumentry_get_int_value
(
struct IC4_PROPERTY *
prop,
int64_t *
pValue
)
Returns the value of an enumeration entry.
- Parameters
-
[in] prop An enumeration entry
[out] pValue A pointer to a double receiving the value of the enumeration entry
- Returns
true
on success, otherwise false
.
Use ic4_get_last_error() to query error information.
- Remarks
- If
prop
is not an enumeration entry, the function fails and the error value is set to IC4_ERROR_GENICAM_TYPE_MISMATCH.
- See also
- ic4_prop_enum_get_entries
bool ic4_prop_enum_set_int_value | ( | struct IC4_PROPERTY * | prop, |
int64_t | entry_value | ||
) |
Selects the currently selected entry of this enumeration property by specifying the entry's value.
This method can be useful to directly set a known enumeration entry, for example setting the PixelFormat
to IC4_PIXEL_FORMAT_Mono8.
- Parameters
-
[in] prop An enumeration property [in] entry_value The value of an enumeration entry of prop
.
- Returns
true
on success, otherwisefalse
.
Use ic4_get_last_error() to query error information.
- Remarks
- If
prop
is not an enumeration property, the function fails and the error value is set to IC4_ERROR_GENICAM_TYPE_MISMATCH.
bool ic4_prop_enum_set_selected_entry | ( | struct IC4_PROPERTY * | prop, |
struct IC4_PROPERTY * | entry | ||
) |
Sets the enumeration's selected entry.
- Parameters
-
[in] prop An enumeration property [in] entry An enumeration entry of prop
.
- Returns
true
on success, otherwisefalse
.
Use ic4_get_last_error() to query error information.
- Remarks
- If
prop
is not an enumeration property, the function fails and the error value is set to IC4_ERROR_GENICAM_TYPE_MISMATCH.
Ifentry
is not an enumeration entry property, the function fails and the error value is set to IC4_ERROR_GENICAM_TYPE_MISMATCH.
Ifentry
is not an enumeration entry ofprop
, the function fails and the error value is set to IC4_ERROR_GENICAM_VALUE_ERROR.
◆ ic4_prop_enum_set_value()
bool ic4_prop_enum_set_value
(
struct IC4_PROPERTY *
prop,
const char *
entry_name
)
Sets the enumeration's selected entry by name.
- Parameters
-
[in] prop An enumeration property
[in] entry_name The name of an enumeration entry of prop
.
- Returns
true
on success, otherwise false
.
Use ic4_get_last_error() to query error information.
- Remarks
- If
prop
is not an enumeration property, the function fails and the error value is set to IC4_ERROR_GENICAM_TYPE_MISMATCH.
If entry_name
is not the name of an entry of prop
, the function fails and the error value is set to IC4_ERROR_GENICAM_VALUE_ERROR.
◆ ic4_prop_enumentry_get_int_value()
bool ic4_prop_enumentry_get_int_value
(
struct IC4_PROPERTY *
prop,
int64_t *
pValue
)
Returns the value of an enumeration entry.
- Parameters
-
[in] prop An enumeration entry
[out] pValue A pointer to a double receiving the value of the enumeration entry
- Returns
true
on success, otherwise false
.
Use ic4_get_last_error() to query error information.
- Remarks
- If
prop
is not an enumeration entry, the function fails and the error value is set to IC4_ERROR_GENICAM_TYPE_MISMATCH.
- See also
- ic4_prop_enum_get_entries
bool ic4_prop_enum_set_value | ( | struct IC4_PROPERTY * | prop, |
const char * | entry_name | ||
) |
Sets the enumeration's selected entry by name.
- Parameters
-
[in] prop An enumeration property [in] entry_name The name of an enumeration entry of prop
.
- Returns
true
on success, otherwisefalse
.
Use ic4_get_last_error() to query error information.
- Remarks
- If
prop
is not an enumeration property, the function fails and the error value is set to IC4_ERROR_GENICAM_TYPE_MISMATCH.
Ifentry_name
is not the name of an entry ofprop
, the function fails and the error value is set to IC4_ERROR_GENICAM_VALUE_ERROR.
bool ic4_prop_enumentry_get_int_value | ( | struct IC4_PROPERTY * | prop, |
int64_t * | pValue | ||
) |
Returns the value of an enumeration entry.
- Parameters
-
[in] prop An enumeration entry [out] pValue A pointer to a double receiving the value of the enumeration entry
- Returns
true
on success, otherwisefalse
.
Use ic4_get_last_error() to query error information.
- Remarks
- If
prop
is not an enumeration entry, the function fails and the error value is set to IC4_ERROR_GENICAM_TYPE_MISMATCH.
- See also
- ic4_prop_enum_get_entries