Imaging Control 4 C Library 1.2.0
|
Represents the property interface of a component, usually a video capture device. More...
Data Structures | |
struct | IC4_PROPERTY_MAP |
Represents the property interface of a component, usually a video capture device. More... | |
Typedefs | |
typedef void *(* | ic4_serialization_allocator) (size_t size) |
Callback function called to allocate memory during the call of ic4_propmap_serialize_to_memory. | |
Functions | |
struct IC4_PROPERTY_MAP * | ic4_propmap_ref (struct IC4_PROPERTY_MAP *map) |
Increases the property map's internal reference count by one. | |
void | ic4_propmap_unref (struct IC4_PROPERTY_MAP *map) |
Decreases the property map's internal reference count by one. | |
bool | ic4_propmap_execute_command (struct IC4_PROPERTY_MAP *map, const char *prop_name) |
Execute a command with a known name. | |
bool | ic4_propmap_get_value_int64 (struct IC4_PROPERTY_MAP *map, const char *prop_name, int64_t *pValue) |
Get the value of a property with a known name as an integer value. | |
bool | ic4_propmap_get_value_double (struct IC4_PROPERTY_MAP *map, const char *prop_name, double *pValue) |
Get the value of a property with a known name as a double value. | |
bool | ic4_propmap_get_value_bool (struct IC4_PROPERTY_MAP *map, const char *prop_name, bool *pValue) |
Get the value of a property with a known name as a bool value. | |
bool | ic4_propmap_get_value_string (struct IC4_PROPERTY_MAP *map, const char *prop_name, char *buffer, size_t *buffer_size) |
Get the value of a property with a known name as a string value. | |
bool | ic4_propmap_set_value_int64 (struct IC4_PROPERTY_MAP *map, const char *prop_name, int64_t value) |
Set the value of a property with a known name to the passed integer value. | |
bool | ic4_propmap_set_value_double (struct IC4_PROPERTY_MAP *map, const char *prop_name, double value) |
Set the value of a property with a known name to the passed double value. | |
bool | ic4_propmap_set_value_bool (struct IC4_PROPERTY_MAP *map, const char *prop_name, bool value) |
Set the value of a property with a known name to the passed bool value. | |
bool | ic4_propmap_set_value_string (struct IC4_PROPERTY_MAP *map, const char *prop_name, const char *value) |
Set the value of a property with a known name to the passed string value. | |
bool | ic4_propmap_find (struct IC4_PROPERTY_MAP *map, const char *prop_name, struct IC4_PROPERTY **ppProperty) |
Returns a property object representing the property with the passed name. | |
bool | ic4_propmap_find_command (struct IC4_PROPERTY_MAP *map, const char *prop_name, struct IC4_PROPERTY **ppProperty) |
Returns a property object representing the command property with the passed name. | |
bool | ic4_propmap_find_integer (struct IC4_PROPERTY_MAP *map, const char *prop_name, struct IC4_PROPERTY **ppProperty) |
Returns a property object representing the integer property with the passed name. | |
bool | ic4_propmap_find_float (struct IC4_PROPERTY_MAP *map, const char *prop_name, struct IC4_PROPERTY **ppProperty) |
Returns a property object representing the float property with the passed name. | |
bool | ic4_propmap_find_boolean (struct IC4_PROPERTY_MAP *map, const char *prop_name, struct IC4_PROPERTY **ppProperty) |
Returns a property object representing the boolean property with the passed name. | |
bool | ic4_propmap_find_string (struct IC4_PROPERTY_MAP *map, const char *prop_name, struct IC4_PROPERTY **ppProperty) |
Returns a property object representing the string property with the passed name. | |
bool | ic4_propmap_find_enumeration (struct IC4_PROPERTY_MAP *map, const char *prop_name, struct IC4_PROPERTY **ppProperty) |
Returns a property object representing the enumeration property with the passed name. | |
bool | ic4_propmap_find_register (struct IC4_PROPERTY_MAP *map, const char *prop_name, struct IC4_PROPERTY **ppProperty) |
Returns a property object representing the register property with the passed name. | |
bool | ic4_propmap_find_category (struct IC4_PROPERTY_MAP *map, const char *prop_name, struct IC4_PROPERTY **ppProperty) |
Returns a property object representing the category property with the passed name. | |
bool | ic4_propmap_get_all (struct IC4_PROPERTY_MAP *map, struct IC4_PROPERTY_LIST **ppList) |
Returns a list of all properties reachable from the property map's "Root" category. | |
bool | ic4_propmap_connect_chunkdata (struct IC4_PROPERTY_MAP *map, struct IC4_IMAGE_BUFFER *image_buffer) |
Enables the use of the chunk data in the passed IC4_IMAGE_BUFFER as a backend for chunk properties in the property map. | |
bool | ic4_propmap_serialize_to_file (struct IC4_PROPERTY_MAP *map, const char *path) |
Saves the state of the properties in this property map into a file. | |
bool | ic4_propmap_serialize_to_memory (struct IC4_PROPERTY_MAP *map, ic4_serialization_allocator alloc, void **ppData, size_t *data_size) |
Saves the state of the properties in this property map in a memory buffer. | |
bool | ic4_propmap_deserialize_from_file (struct IC4_PROPERTY_MAP *map, const char *path) |
Restores the state of the properties in this property map from a file that was previously written by ic4_propmap_serialize_to_file. | |
bool | ic4_propmap_deserialize_from_memory (struct IC4_PROPERTY_MAP *map, const void *pData, size_t data_size) |
Restores the state of the properties in this property map from a memory buffer containing data that was previously written by ic4_propmap_serialize_to_memory. | |
Represents the property interface of a component, usually a video capture device.
typedef void *(* ic4_serialization_allocator) (size_t size) |
Callback function called to allocate memory during the call of ic4_propmap_serialize_to_memory.
[in] | size | Size of the memory buffer to be allocated. |
NULL
if the allocation was not possible.NULL
, the call to ic4_propmap_serialize_to_memory will fail.bool ic4_propmap_connect_chunkdata | ( | struct IC4_PROPERTY_MAP * | map, |
struct IC4_IMAGE_BUFFER * | image_buffer | ||
) |
Enables the use of the chunk data in the passed IC4_IMAGE_BUFFER as a backend for chunk properties in the property map.
[in] | map | A property map |
[in] | image_buffer | An image buffer with chunk data. This parameter may be NULL to disconnect the previously connected buffer. |
true
on success, otherwise false
.NULL
is passed in the image_buffer
argument. bool ic4_propmap_deserialize_from_file | ( | struct IC4_PROPERTY_MAP * | map, |
const char * | path | ||
) |
Restores the state of the properties in this property map from a file that was previously written by ic4_propmap_serialize_to_file.
[in] | map | A property map |
[in] | path | Path to a file that was previously written by ic4_propmap_serialize_to_file |
true
on success, otherwise false
.bool ic4_propmap_deserialize_from_memory | ( | struct IC4_PROPERTY_MAP * | map, |
const void * | pData, | ||
size_t | data_size | ||
) |
Restores the state of the properties in this property map from a memory buffer containing data that was previously written by ic4_propmap_serialize_to_memory.
[in] | map | A property map |
[in] | pData | Pointer to a memory buffer containing data that was written by ic4_propmap_serialize_to_memory |
[in] | data_size | Size of the memory buffer pointed to by pData |
true
on success, otherwise false
.bool ic4_propmap_execute_command | ( | struct IC4_PROPERTY_MAP * | map, |
const char * | prop_name | ||
) |
Execute a command with a known name.
[in] | map | A property map |
[in] | prop_name | Name of a command property inside map |
true
on success, otherwise false
.prop_name
in map
, the function fails and the error value is set to IC4_ERROR_GENICAM_FEATURE_NOT_FOUND. prop_name
, but it is not a command property, the function fails and the error value is set to IC4_ERROR_GENICAM_TYPE_MISMATCH. bool ic4_propmap_find | ( | struct IC4_PROPERTY_MAP * | map, |
const char * | prop_name, | ||
struct IC4_PROPERTY ** | ppProperty | ||
) |
Returns a property object representing the property with the passed name.
[in] | map | A property map |
[in] | prop_name | The name of a property inside map |
[out] | ppProperty | Pointer to a handle receiving the property object When the property is no longer required, release the object reference using ic4_prop_unref(). |
true
on success, otherwise false
.prop_name
inside map
, the function fails and the error value is set to IC4_ERROR_GENICAM_FEATURE_NOT_FOUND. bool ic4_propmap_find_boolean | ( | struct IC4_PROPERTY_MAP * | map, |
const char * | prop_name, | ||
struct IC4_PROPERTY ** | ppProperty | ||
) |
Returns a property object representing the boolean property with the passed name.
[in] | map | A property map |
[in] | prop_name | The name of a boolean property inside map |
[out] | ppProperty | Pointer to a handle receiving the property object When the property is no longer required, release the object reference using ic4_prop_unref(). |
true
on success, otherwise false
.prop_name
inside map
, the function fails and the error value is set to IC4_ERROR_GENICAM_FEATURE_NOT_FOUND. prop_name
, but it is not a boolean property, the function fails and the error value is set to IC4_ERROR_GENICAM_TYPE_MISMATCH. bool ic4_propmap_find_category | ( | struct IC4_PROPERTY_MAP * | map, |
const char * | prop_name, | ||
struct IC4_PROPERTY ** | ppProperty | ||
) |
Returns a property object representing the category property with the passed name.
[in] | map | A property map |
[in] | prop_name | The name of a category property inside map |
[out] | ppProperty | Pointer to a handle receiving the property object When the property is no longer required, release the object reference using ic4_prop_unref(). |
true
on success, otherwise false
.prop_name
inside map
, the function fails and the error value is set to IC4_ERROR_GENICAM_FEATURE_NOT_FOUND. prop_name
, but it is not a category property, the function fails and the error value is set to IC4_ERROR_GENICAM_TYPE_MISMATCH. bool ic4_propmap_find_command | ( | struct IC4_PROPERTY_MAP * | map, |
const char * | prop_name, | ||
struct IC4_PROPERTY ** | ppProperty | ||
) |
Returns a property object representing the command property with the passed name.
[in] | map | A property map |
[in] | prop_name | The name of a command property inside map |
[out] | ppProperty | Pointer to a handle receiving the property object When the property is no longer required, release the object reference using ic4_prop_unref(). |
true
on success, otherwise false
.prop_name
inside map
, the function fails and the error value is set to IC4_ERROR_GENICAM_FEATURE_NOT_FOUND. prop_name
, but it is not a command property, the function fails and the error value is set to IC4_ERROR_GENICAM_TYPE_MISMATCH. bool ic4_propmap_find_enumeration | ( | struct IC4_PROPERTY_MAP * | map, |
const char * | prop_name, | ||
struct IC4_PROPERTY ** | ppProperty | ||
) |
Returns a property object representing the enumeration property with the passed name.
[in] | map | A property map |
[in] | prop_name | The name of an enumeration property inside map |
[out] | ppProperty | Pointer to a handle receiving the property object When the property is no longer required, release the object reference using ic4_prop_unref(). |
true
on success, otherwise false
.prop_name
inside map
, the function fails and the error value is set to IC4_ERROR_GENICAM_FEATURE_NOT_FOUND. prop_name
, but it is not an enumeration property, the function fails and the error value is set to IC4_ERROR_GENICAM_TYPE_MISMATCH. bool ic4_propmap_find_float | ( | struct IC4_PROPERTY_MAP * | map, |
const char * | prop_name, | ||
struct IC4_PROPERTY ** | ppProperty | ||
) |
Returns a property object representing the float property with the passed name.
[in] | map | A property map |
[in] | prop_name | The name of a float property inside map |
[out] | ppProperty | Pointer to a handle receiving the property object When the property is no longer required, release the object reference using ic4_prop_unref(). |
true
on success, otherwise false
.prop_name
inside map
, the function fails and the error value is set to IC4_ERROR_GENICAM_FEATURE_NOT_FOUND. prop_name
, but it is not a float property, the function fails and the error value is set to IC4_ERROR_GENICAM_TYPE_MISMATCH. bool ic4_propmap_find_integer | ( | struct IC4_PROPERTY_MAP * | map, |
const char * | prop_name, | ||
struct IC4_PROPERTY ** | ppProperty | ||
) |
Returns a property object representing the integer property with the passed name.
[in] | map | A property map |
[in] | prop_name | The name of an integer property inside map |
[out] | ppProperty | Pointer to a handle receiving the property object When the property is no longer required, release the object reference using ic4_prop_unref(). |
true
on success, otherwise false
.prop_name
inside map
, the function fails and the error value is set to IC4_ERROR_GENICAM_FEATURE_NOT_FOUND. prop_name
, but it is not an integer property, the function fails and the error value is set to IC4_ERROR_GENICAM_TYPE_MISMATCH. bool ic4_propmap_find_register | ( | struct IC4_PROPERTY_MAP * | map, |
const char * | prop_name, | ||
struct IC4_PROPERTY ** | ppProperty | ||
) |
Returns a property object representing the register property with the passed name.
[in] | map | A property map |
[in] | prop_name | The name of a register property inside map |
[out] | ppProperty | Pointer to a handle receiving the property object When the property is no longer required, release the object reference using ic4_prop_unref(). |
true
on success, otherwise false
.prop_name
inside map
, the function fails and the error value is set to IC4_ERROR_GENICAM_FEATURE_NOT_FOUND. prop_name
, but it is not a register property, the function fails and the error value is set to IC4_ERROR_GENICAM_TYPE_MISMATCH. bool ic4_propmap_find_string | ( | struct IC4_PROPERTY_MAP * | map, |
const char * | prop_name, | ||
struct IC4_PROPERTY ** | ppProperty | ||
) |
Returns a property object representing the string property with the passed name.
[in] | map | A property map |
[in] | prop_name | The name of a string property inside map |
[out] | ppProperty | Pointer to a handle receiving the property object When the property is no longer required, release the object reference using ic4_prop_unref(). |
true
on success, otherwise false
.prop_name
inside map
, the function fails and the error value is set to IC4_ERROR_GENICAM_FEATURE_NOT_FOUND. prop_name
, but it is not a string property, the function fails and the error value is set to IC4_ERROR_GENICAM_TYPE_MISMATCH. bool ic4_propmap_get_all | ( | struct IC4_PROPERTY_MAP * | map, |
struct IC4_PROPERTY_LIST ** | ppList | ||
) |
Returns a list of all properties reachable from the property map's "Root" category.
[in] | map | A property map |
[out] | ppList | A pointer to a property list receiving the list of properties. When the property list is no longer required, release the object reference using ic4_proplist_unref(). |
true
on success, otherwise false
.bool ic4_propmap_get_value_bool | ( | struct IC4_PROPERTY_MAP * | map, |
const char * | prop_name, | ||
bool * | pValue | ||
) |
Get the value of a property with a known name as a bool value.
The behavior depends on the type of the property:
true
or false
.[in] | map | A property map |
[in] | prop_name | Name of a property inside map |
[out] | pValue | Pointer to a double to receive the value of the property |
true
on success, otherwise false
.prop_name
in map
, the function fails and the error value is set to IC4_ERROR_GENICAM_FEATURE_NOT_FOUND. bool ic4_propmap_get_value_double | ( | struct IC4_PROPERTY_MAP * | map, |
const char * | prop_name, | ||
double * | pValue | ||
) |
Get the value of a property with a known name as a double value.
The behavior depends on the type of the property:
double
.[in] | map | A property map |
[in] | prop_name | Name of a property inside map |
[out] | pValue | Pointer to a double to receive the value of the property |
true
on success, otherwise false
.prop_name
in map
, the function fails and the error value is set to IC4_ERROR_GENICAM_FEATURE_NOT_FOUND. bool ic4_propmap_get_value_int64 | ( | struct IC4_PROPERTY_MAP * | map, |
const char * | prop_name, | ||
int64_t * | pValue | ||
) |
Get the value of a property with a known name as an integer value.
The behavior depends on the type of the property:
1
or 0
.[in] | map | A property map |
[in] | prop_name | Name of a property inside map |
[out] | pValue | Pointer to an integer to receive the value of the property |
true
on success, otherwise false
.prop_name
in map
, the function fails and the error value is set to IC4_ERROR_GENICAM_FEATURE_NOT_FOUND. bool ic4_propmap_get_value_string | ( | struct IC4_PROPERTY_MAP * | map, |
const char * | prop_name, | ||
char * | buffer, | ||
size_t * | buffer_size | ||
) |
Get the value of a property with a known name as a string value.
The behavior depends on the type of the property:
"true"
or "false"
.[in] | map | A property map |
[in] | prop_name | Name of a property inside map |
[out] | buffer | Pointer to a character array to receive the string value. This parameter can be NULL to find out the required space without allocating an initial array. |
[in,out] | buffer_size | Pointer to a size_t describing the length of the array pointed to by buffer.The function always writes the actual number of characters required to store the string representation. |
true
on success, otherwise false
.prop_name
in map
, the function fails and the error value is set to IC4_ERROR_GENICAM_FEATURE_NOT_FOUND. struct IC4_PROPERTY_MAP * ic4_propmap_ref | ( | struct IC4_PROPERTY_MAP * | map | ) |
Increases the property map's internal reference count by one.
[in] | map | A property map |
NULL
, the function returns NULL
. An error value is not set.bool ic4_propmap_serialize_to_file | ( | struct IC4_PROPERTY_MAP * | map, |
const char * | path | ||
) |
Saves the state of the properties in this property map into a file.
[in] | map | A property map |
[in] | path | A path to a file that the property state is written to |
true
on success, otherwise false
.bool ic4_propmap_serialize_to_memory | ( | struct IC4_PROPERTY_MAP * | map, |
ic4_serialization_allocator | alloc, | ||
void ** | ppData, | ||
size_t * | data_size | ||
) |
Saves the state of the properties in this property map in a memory buffer.
[in] | map | A property map |
[in] | alloc | Pointer to a function that allocates the memory buffer. For example, malloc can be passed here. |
[out] | ppData | Pointer to a pointer to receive the newly-allocated memory buffer containing the properties. The caller is responsible for releasing the memory, using a function that can free memory returned by alloc . |
[out] | data_size | Pointer to size_t to receive the size of the memory buffer allocated by the call |
true
on success, otherwise false
.bool ic4_propmap_set_value_bool | ( | struct IC4_PROPERTY_MAP * | map, |
const char * | prop_name, | ||
bool | value | ||
) |
Set the value of a property with a known name to the passed bool value.
The behavior depends on the type of the property:
true
or false
, if available.true
.[in] | map | A property map |
[in] | prop_name | Name of a property inside map |
[in] | value | New value to be set for the property identified by prop_name |
true
on success, otherwise false
.prop_name
in map
, the function fails and the error value is set to IC4_ERROR_GENICAM_FEATURE_NOT_FOUND. bool ic4_propmap_set_value_double | ( | struct IC4_PROPERTY_MAP * | map, |
const char * | prop_name, | ||
double | value | ||
) |
Set the value of a property with a known name to the passed double value.
The behavior depends on the type of the property:
[in] | map | A property map |
[in] | prop_name | Name of a property inside map |
[in] | value | New value to be set for the property identified by prop_name |
true
on success, otherwise false
.prop_name
in map
, the function fails and the error value is set to IC4_ERROR_GENICAM_FEATURE_NOT_FOUND. bool ic4_propmap_set_value_int64 | ( | struct IC4_PROPERTY_MAP * | map, |
const char * | prop_name, | ||
int64_t | value | ||
) |
Set the value of a property with a known name to the passed integer value.
The behavior depends on the type of the property:
1
or 0
, it is set to true
or false
respectively. Other values result in an error.PixelFormat
. Other properties result in an error.1
.[in] | map | A property map |
[in] | prop_name | Name of a property inside map |
[in] | value | New value to be set for the property identified by prop_name |
true
on success, otherwise false
.prop_name
in map
, the function fails and the error value is set to IC4_ERROR_GENICAM_FEATURE_NOT_FOUND. bool ic4_propmap_set_value_string | ( | struct IC4_PROPERTY_MAP * | map, |
const char * | prop_name, | ||
const char * | value | ||
) |
Set the value of a property with a known name to the passed string value.
The behavior depends on the type of the property:
true
or false
."1"
, "true"
or "execute"
.[in] | map | A property map |
[in] | prop_name | Name of a property inside map |
[in] | value | New value to be set for the property identified by prop_name |
true
on success, otherwise false
.prop_name
in map
, the function fails and the error value is set to IC4_ERROR_GENICAM_FEATURE_NOT_FOUND. void ic4_propmap_unref | ( | struct IC4_PROPERTY_MAP * | map | ) |
Decreases the property map's internal reference count by one.
If the reference count reaches zero, the object is destroyed.
[in] | map | A property map |
NULL
, the function does nothing. An error value is not set.