Imaging Control 4 C Library 1.2.0
|
Represents a property of a component, usually of a video capture device. More...
Modules | |
Category Properties | |
Category properties define a tree-relationship between all properties in a property map. | |
Command Properties | |
Command properties represent an action that can be performed by the device. | |
Integer Properties | |
Integer properties represent a feature whose value is an integer number. | |
Float Properties | |
Float properties represent a feature whose value is a floating-point number. | |
Boolean Properties | |
Boolean properties represent a feature whose value is a simple on/off switch. | |
String Properties | |
String properties represent features whole value is a text. | |
Enumeration Properties | |
Enumeration properties represent a feature whose value is selected from a list of named entries. | |
Register Properties | |
Register properties have a value represented by raw bytes. | |
Data Structures | |
struct | IC4_PROPERTY |
Represents a property of a component, usually of a video capture device. More... | |
Typedefs | |
typedef void(* | ic4_prop_notification) (struct IC4_PROPERTY *prop, void *user_ptr) |
Property notification handler function pointer. | |
typedef void(* | ic4_prop_notification_deleter) (void *user_ptr) |
Property notification deleter. | |
Enumerations | |
enum | IC4_PROPERTY_TYPE { IC4_PROPTYPE_INVALID , IC4_PROPTYPE_INTEGER , IC4_PROPTYPE_FLOAT , IC4_PROPTYPE_ENUMERATION , IC4_PROPTYPE_BOOLEAN , IC4_PROPTYPE_STRING , IC4_PROPTYPE_COMMAND , IC4_PROPTYPE_CATEGORY , IC4_PROPTYPE_REGISTER , IC4_PROPTYPE_PORT , IC4_PROPTYPE_ENUMENTRY } |
Defines the possible property types. More... | |
enum | IC4_PROPERTY_VISIBILITY { IC4_PROPVIS_BEGINNER , IC4_PROPVIS_EXPERT , IC4_PROPVIS_GURU , IC4_PROPVIS_INVISIBLE } |
Defines the possible property visibilities. More... | |
enum | IC4_PROPERTY_INCREMENT_MODE { IC4_PROPINCMODE_INCREMENT , IC4_PROPINCMODE_VALUESET , IC4_PROPINCMODE_NONE } |
Defines the possible property increment modes for Integer and Float properties. More... | |
Functions | |
struct IC4_PROPERTY * | ic4_prop_ref (struct IC4_PROPERTY *prop) |
Increases the property's internal reference count by one. | |
void | ic4_prop_unref (struct IC4_PROPERTY *prop) |
Decreases the property's internal reference count by one. | |
enum IC4_PROPERTY_TYPE | ic4_prop_get_type (struct IC4_PROPERTY *prop) |
Returns the type of the passed property. | |
const char * | ic4_prop_get_name (struct IC4_PROPERTY *prop) |
Returns the name of the passed property. | |
bool | ic4_prop_is_available (struct IC4_PROPERTY *prop) |
Checks whether a property is currently available. | |
bool | ic4_prop_is_locked (struct IC4_PROPERTY *prop) |
Checks whether a property is currently locked. | |
bool | ic4_prop_is_likely_locked_by_stream (struct IC4_PROPERTY *prop) |
Tries to determine whether a property is locked because a data stream is active. | |
bool | ic4_prop_is_readonly (struct IC4_PROPERTY *prop) |
Checks whether a property is read-only. | |
enum IC4_PROPERTY_VISIBILITY | ic4_prop_get_visibility (struct IC4_PROPERTY *prop) |
Returns a visibility hint for the property. | |
const char * | ic4_prop_get_display_name (struct IC4_PROPERTY *prop) |
Returns the display name of the passed property. | |
const char * | ic4_prop_get_tooltip (struct IC4_PROPERTY *prop) |
Returns a tooltip for the passed property. | |
const char * | ic4_prop_get_description (struct IC4_PROPERTY *prop) |
Returns a description text for the passed property. | |
bool | ic4_prop_event_add_notification (struct IC4_PROPERTY *prop, ic4_prop_notification handler, void *user_ptr, ic4_prop_notification_deleter deleter) |
Registers a property notification handler. | |
bool | ic4_prop_event_remove_notification (struct IC4_PROPERTY *prop, ic4_prop_notification handler, void *user_ptr) |
Unregisters a previously registered notification handler. | |
bool | ic4_prop_is_selector (struct IC4_PROPERTY *prop) |
Indicates whether this property's value changes the meaning and/or value of other properties. | |
bool | ic4_prop_get_selected_props (struct IC4_PROPERTY *prop, struct IC4_PROPERTY_LIST **ppSelected) |
Returns the list of properties whose values' meaning depend on this property. | |
Represents a property of a component, usually of a video capture device.
typedef void(* ic4_prop_notification) (struct IC4_PROPERTY *prop, void *user_ptr) |
Property notification handler function pointer.
[in] | prop | The property that has changed |
[in] | user_ptr | The user data that was specified when the notification handler was registered |
typedef void(* ic4_prop_notification_deleter) (void *user_ptr) |
Property notification deleter.
[in] | user_ptr | The user data that was specified when the notification deleter was registered |
Defines the possible property increment modes for Integer and Float properties.
Enumerator | |
---|---|
IC4_PROPINCMODE_INCREMENT | The property used a fixed step between valid values. Use ic4_prop_integer_get_inc() or ic4_prop_float_get_inc() to get the property's step size. |
IC4_PROPINCMODE_VALUESET | The property defines a set of valid values. Use ic4_prop_integer_get_valid_value_set() or ic4_prop_float_get_valid_value_set() to query the set of valid values. |
IC4_PROPINCMODE_NONE | The property allows setting all values between its minimum and maximum value. This mode is only valid for Float properties. Integer properties report increment 1 if they want to allow every possible value between their minimum and maximum value. |
enum IC4_PROPERTY_TYPE |
Defines the possible property types.
The property type defines the possible operations on a property and its data type.
Defines the possible property visibilities.
Each property has a visibility hint that can be used to create user interfaces for different user types.
Enumerator | |
---|---|
IC4_PROPVIS_BEGINNER | Beginner visibility. |
IC4_PROPVIS_EXPERT | Expert visibility. |
IC4_PROPVIS_GURU | Guru visibility. |
IC4_PROPVIS_INVISIBLE | Invisible. |
bool ic4_prop_event_add_notification | ( | struct IC4_PROPERTY * | prop, |
ic4_prop_notification | handler, | ||
void * | user_ptr, | ||
ic4_prop_notification_deleter | deleter | ||
) |
Registers a property notification handler.
The property notification handler is called whenever an aspect of the property changes, for example its value or locked status.
[in] | prop | A property |
[in] | handler | The property notification handler to be called if prop changes |
[in] | user_ptr | User data to be passed to the notification handler |
[in] | deleter | The property notification deleter to be called if the notification is removed, or the property is destroyed |
true
on success, otherwise false
.deleter
callback can useful to release resources that the caller passed in into user_ptr
.user_ptr
parameter is different.bool ic4_prop_event_remove_notification | ( | struct IC4_PROPERTY * | prop, |
ic4_prop_notification | handler, | ||
void * | user_ptr | ||
) |
Unregisters a previously registered notification handler.
[in] | prop | A property with a registered notification handler |
[in] | handler | The property notification handler to be removed |
[in] | user_ptr | The user data that was specified when the handler was registered |
true
on success, otherwise false
.handler
and user_ptr
must exactly match the arguments of the previous successful call to ic4_prop_event_add_notification().const char * ic4_prop_get_description | ( | struct IC4_PROPERTY * | prop | ) |
Returns a description text for the passed property.
[in] | prop | A property |
NULL
in case of an error.const char * ic4_prop_get_display_name | ( | struct IC4_PROPERTY * | prop | ) |
Returns the display name of the passed property.
[in] | prop | A property |
NULL
in case of an error.ExposureTime
property usually is Exposure Time.const char * ic4_prop_get_name | ( | struct IC4_PROPERTY * | prop | ) |
Returns the name of the passed property.
[in] | prop | A property |
NULL
in case of an error.ExposureTime
or AcquisitionFrameRate
.bool ic4_prop_get_selected_props | ( | struct IC4_PROPERTY * | prop, |
struct IC4_PROPERTY_LIST ** | ppSelected | ||
) |
Returns the list of properties whose values' meaning depend on this property.
[in] | prop | A property that is a selector |
[out] | ppSelected | A pointer to a property list receiving the list of properties selected by prop . When the property list is no longer required, release the object reference using ic4_proplist_unref(). |
true
on success, otherwise false
.prop
is not a boolean property, the function fails and the error value is set to IC4_ERROR_GENICAM_TYPE_MISMATCH. const char * ic4_prop_get_tooltip | ( | struct IC4_PROPERTY * | prop | ) |
Returns a tooltip for the passed property.
[in] | prop | A property |
NULL
in case of an error.enum IC4_PROPERTY_TYPE ic4_prop_get_type | ( | struct IC4_PROPERTY * | prop | ) |
Returns the type of the passed property.
[in] | prop | A property |
prop
, or IC4_PROPTYPE_INVALID in case of an error.enum IC4_PROPERTY_VISIBILITY ic4_prop_get_visibility | ( | struct IC4_PROPERTY * | prop | ) |
Returns a visibility hint for the property.
The visibility hint can be used to create user interfaces with different complexities. The most commonly used properties have the beginner visibility, while rarely used or diagnostic features might be tagged guru or even invisible.
[in] | prop | A property |
bool ic4_prop_is_available | ( | struct IC4_PROPERTY * | prop | ) |
Checks whether a property is currently available.
If a property is not available, attempts to read or write its value will fail.
A property may become unavailable, if its value does not have a meaning in the current state of the device. The property's availability status can change upon writing to another property.
[in] | prop | A property |
true
, if the property is currently available, otherwise false
.false
. Use ic4_get_last_error() to query error information.bool ic4_prop_is_likely_locked_by_stream | ( | struct IC4_PROPERTY * | prop | ) |
Tries to determine whether a property is locked because a data stream is active.
[in] | prop | A property |
true
, if the property is currently locked, and will likely be unlocked if the data stream is stopped.false
, if the property is not currently locked, or stopping the data stream will probably not lead to the property being unlocked.false
. Use ic4_get_last_error() to query error information.bool ic4_prop_is_locked | ( | struct IC4_PROPERTY * | prop | ) |
Checks whether a property is currently locked.
A locked property can be read, but attempts to write its value will fail.
A property's locked status may change upon writing to another property.
Common examples for locked properties are ExposureTime
or Gain
if ExposureAuto
or GainAuto
are enabled.
[in] | prop | A property |
true
, if the property is currently locked, otherwise false
.false
. Use ic4_get_last_error() to query error information.bool ic4_prop_is_readonly | ( | struct IC4_PROPERTY * | prop | ) |
Checks whether a property is read-only.
A read-only property will never be writable, the read-only status will never change.
A Common examples for read-only property is DeviceTemperature
.
[in] | prop | A property |
true
, if the property is read-only, otherwise false
.false
. Use ic4_get_last_error() to query error information.bool ic4_prop_is_selector | ( | struct IC4_PROPERTY * | prop | ) |
Indicates whether this property's value changes the meaning and/or value of other properties.
[in] | prop | A property |
true
, if prop
is a selector, otherwise false
.false
. Use ic4_get_last_error() to query error information.struct IC4_PROPERTY * ic4_prop_ref | ( | struct IC4_PROPERTY * | prop | ) |
Increases the property's internal reference count by one.
[in] | prop | A property |
NULL
, the function returns NULL
. An error value is not set.void ic4_prop_unref | ( | struct IC4_PROPERTY * | prop | ) |
Decreases the property's internal reference count by one.
If the reference count reaches zero, the object is destroyed.
[in] | prop | A property |
NULL
, the function does nothing. An error value is not set.