hidd_report_props_t
HID report properties
Synopsis:
#include <sys/hiddi.h>
typedef struct hidd_report_props {
_Uint16t usage_page;
_Uint8t report_id;
_Uint8t reserved[1];
_Uint16t report_size;
_Uint16t report_count;
_Uint32t data_properties;
_Uint16t unit_exponent;
_Uint16t unit;
_Int16t logical_min, logical_max;
_Int16t physical_min, physical_max;
_Uint16t usage_min, usage_max;
_Uint16t string_min, string_max;
_Uint16t designator_min, designator_max;
_Uint8t reserved2[2];
} hidd_report_props_t;Description:
HID report properties, as returned by hidd_get_report_props().
The members include:
- usage_page
-
The usage page of the report (refer to the HID spec and HID usage tables).
- report_id
-
The report ID. May not be specified for descriptors containing a single report.
- report_size
-
The size in bits of the report data.
- report_count
-
The number of data fields for the report.
- data_properties
-
One or more data properties flags OR’ed together:
- HIDD_DATA_CONSTANT - if set data is constant, else data is data
- HIDD_DATA_VARIABLE - if set data is variable, else data is array
- HIDD_DATA_RELATIVE - if set data is relative, else data is absolute
- HIDD_DATA_WRAP - if set data has wrap, else data has no wrap
- HIDD_DATA_NONLINEAR - if set data is non-linear, else data is linear
- HIDD_DATA_NO_PREFERRED_STATE - if set data has no preferred state, else data has preferred state
- HIDD_DATA_NULL_STATE - if set data has NULL state, else data has no NULL state
- HIDD_DATA_VOLITILE - if set data is volatile, else data is non-volatile
- HIDD_DATA_BUFFERED_BYTES - if set data is buffered bytes, else data is a bit-field
- unit_exponent
-
Exponent of the unit in base 10. Used when getting or setting scaled usage value to determine the logical vs. physical ratio.
- unit
-
The unit code of the report (refer to the HID spec and HID usage tables).
- logical_min, logical_max
-
The smallest and largest possible values of a variable or array. For example, logical_min and logical_max for a thermometer that measures 0°C to 100°C could be
0and16384. - physical_min, physical_max
-
Along with unit_exponent, used to determine the scaling factor used in scaled usage value calculations. For example, physical_min and physical_max for a thermometer that measures 0°C to 100°C with 0.1°C accuracy could be
0and1000.Per spec, if either physical_min or physical_max are undefined or
0, they are set to the values of logical_min and logical_max respectively. If unit_exponent is undefined, it is set to0.The resolution is then calculated as:
(logical_max - logical_min) / ((physical_max - physical_min) * 10unit_exponent)) - usage_min, usage_max
-
A range of usages associated with an array or bitmap (refer to the HID spec and HID usage tables).
- string_min, string_max
-
A range of string indices for a group of sequential strings in an array or bitmap (refer to the HID spec and HID usage tables).
- designator_min, designator_max
-
A range of the designators associated with an array or bitmap (refer to the HID spec and HID usage tables).
