Manual page for xil_get_device_attribute(3)
xil_get_device_attribute, xil_set_device_attribute - get and set the values of attributes of device images
SYNOPSIS
#include <xil/xil.h>
int xil_get_device_attribute (XilImage image,
char *attribute,
void **value);
int xil_set_device_attribute (XilImage image,
char *attribute,
void *value);
DESCRIPTION
These routines get and set the values of attributes of device images.
image
is a handle to a device image.
attribute
is the name of an attribute, and
value
is the attribute's value. Attribute names and their possible
values are defined by the group that writes the device handler.
xil_get_device_attribute()
gets a device-specific
attribute.
It returns XIL_SUCCESS if the
attribute is available, and XIL_FAILURE if the specified attribute
is not available.
xil_set_device_attribute()
sets a device-specific
attribute.
It returns XIL_SUCCESS if the
attribute is successfully set, and XIL_FAILURE otherwise.
ERRORS
For a complete list of XIL error messages by number, consult Appendix B of the
XIL Programmer's Guide.
EXAMPLES
Set the brightness of a frame-grabber input image:
-
int brightness;
brightness = 100;
XilImage framegrabber_image;
status = xil_set_device_attribute(framegrabber_image, "BRIGHTNESS",
(void *)brightness);
if(status==XIL_FAILURE)
fprintf(stderr,"Setting BRIGHTNESS attribute failed");
Get the contrast of a frame-grabber input image:
-
int contrast;
XilImage framegrabber_image;
status = xil_get_device_attribute(framegrabber_image, "CONTRAST",
(void **)&contrast);
if(status==XIL_FAILURE)
fprintf(stderr,"Getting CONTRAST attribute failed");
NOTES
xil_set_device_attribute()
is used to set the attributes of an existing device image;
it cannot be used to initialize attribute values before
creating the device image. To initialize device attributes, use
xil_device_set_value().
SEE ALSO
xil_create_from_window.3
xil_create_from_device.3
xil_get_attribute.3
xil_get_readable.3
xil_get_writable.3
xil_device_create.3
xil_device_set_value.3
Created by unroff & hp-tools.
© by Hans-Peter Bischof. All Rights Reserved (1997).
Last modified 07/October/97