Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

egd_get_cap(3) [debian man page]

EGD_GET_CAP(3)						       EEGDEV library manual						    EGD_GET_CAP(3)

NAME
egd_get_cap - Query various information about the device capabilities SYNOPSIS
#include <eegdev.h> int egd_get_cap(const struct eegdev* dev, int cap, void* val); DESCRIPTION
egd_get_cap() returns the information about the capability specified by cap of the recording device referenced by dev by the mean of the pointer val. The type of pointer passed through val is dependent on the requested capability cap which can be one the following (The expected type pointed by val is provided in parenthesis): EGD_CAP_FS (int) Sampling frequency that is currently set. The same value is returned by the function. EGD_CAP_TYPELIST (const int*) Array of sensor types sampled by the device terminated by -1. These values became valid as argument for egd_sensor_name(3) when opening the device dev if they were not yet before. The number of elements in the array (excluding the -1 element) is provided by the return value of the function. EGD_CAP_DEVTYPE (const char*) Null terminated string describing the type of the recording device (Manufacturer and model if dev refers to actual hardware). The length of string (excluding the null character) is provided by the return value of the function. EGD_DEVID (const char*) Null-terminated string describing the model of the recording device (or an unique identifier of the resource). The length of string (excluding the null character) is provided by the return value of the function. RETURN VALUE
In case of success, the function returns a positive value depending on the requested capability. Otherwise, -1 is returned and errno is set accordingly. ERRORS
egd_get_cap() will fail if: EINVAL dev is NULL, cap is not valid value or val is NULL while cap is not EGD_CAP_FS. SEE ALSO
egd_sensor_name(3) EPFL
2011 EGD_GET_CAP(3)

Check Out this Related Man Page

tran_getcap(9E) 						Driver Entry Points						   tran_getcap(9E)

NAME
tran_getcap, tran_setcap - get/set SCSI transport capability SYNOPSIS
#include <sys/scsi/scsi.h> int prefixtran_getcap(struct scsi_address *ap, char *cap, int whom); int prefixtran_setcap(struct scsi_address *ap, char *cap, int value, int whom); INTERFACE LEVEL
Solaris architecture specific (Solaris DDI). PARAMETERS
ap Pointer to the scsi_address(9S) structure. cap Pointer to the string capability identifier. value Defines the new state of the capability. whom Specifies whether all targets or only the specified target is affected. DESCRIPTION
The tran_getcap() and tran_setcap() vectors in the scsi_hba_tran(9S) structure must be initialized during the HBA driver's attach(9E) to point to HBA entry points to be called when a target driver calls scsi_ifgetcap(9F) and scsi_ifsetcap(9F). tran_getcap() is called to get the current value of a capability specific to features provided by the HBA hardware or driver. The name of the capability cap is the NULL terminated capability string. If whom is non-zero, the request is for the current value of the capability defined for the target specified by the scsi_address(9S) structure pointed to by ap; if whom is 0, all targets are affected; else, the target specified by the scsi_address structure pointed to by ap is affected. tran_setcap() is called to set the value of the capability cap to the value of value. If whom is non-zero, the capability should be set for the target specified by the scsi_address(9S) structure pointed to by ap; if whom is 0, all targets are affected; else, the target specified by the scsi_address structure pointed to by ap is affected. It is recommended that HBA drivers do not support setting capabilities for all targets, that is, whom is 0. A device may support only a subset of the defined capabilities. Refer to scsi_ifgetcap(9F) for the list of defined capabilities. HBA drivers should use scsi_hba_lookup_capstr(9F) to match cap against the canonical capability strings. RETURN VALUES
tran_setcap() must return 1 if the capability was successfully set to the new value, 0 if the HBA driver does not support changing the capability, and -1 if the capability was not defined. tran_getcap() must return the current value of a capability or -1 if the capability was not defined. SEE ALSO
attach(9E), scsi_hba_attach(9F), scsi_hba_lookup_capstr(9F), scsi_ifgetcap(9F), scsi_address(9S), scsi_hba_tran(9S) Writing Device Drivers SunOS 5.10 30 Aug 1995 tran_getcap(9E)
Man Page