1gii_cmddata_getvalinfo(3)             GGI            gii_cmddata_getvalinfo(3)
2
3
4

NAME

6       gii_cmddata_getvalinfo,  gii_phystype,  gii_valrange  :  GII  valuators
7       description
8

SYNOPSIS

10       #include <ggi/events.h>
11
12       typedef struct gii_valrange {
13           int32_t           min, center, max;
14       } gii_valrange;
15
16       typedef struct {
17           uint32_t          number;
18           char              longname[75];
19           char              shortname[5];
20           gii_valrange      range;
21           gii_phystype      phystype;
22           int32_t           SI_add,SI_mul,SI_div,SI_shift;
23       } gii_cmddata_getvalinfo;
24
25

DESCRIPTION

27       This structure is used to describe the values reported  by  a  specific
28       valuator.
29

STRUCTURE MEMBERS

31       gii_cmddata_getvalinfo fields are defined as follow:
32
33       number Number of the queried valuator.
34
35
36       longname
37              A human-redable NULL terminated string identifying the valuator.
38
39
40       shortname
41              A NULL terminated abbreviated name for this valuator.
42
43
44       range  Contains  the minimum, center and maximum values for this valua‐
45              tor. Note that this range may change on some devices due to cal‐
46              ibration,  but  it is usually not expected that a device recali‐
47              brates while in use.  You  should  react  gracefully  to  values
48              received from the valuator that are outside the specified range,
49              though.
50
51
52       phystype
53              Gives the physical quantity the device measures. The idea is  to
54              report  the  thing  the  user actually controls. I.e. a Joystick
55              actually measures resistance, but should report GII_PT_ANGLE  or
56              GII_PT_FORCE,  as  that  is  what the user does to the stick and
57              what results in the changed resistance.
58
59
60       SI_add, SI_mul, SI_div, SI_shift
61              Using these values, it is possible to give calibration  data  to
62              the  application  or  to compute the actual floating point value
63              (in the unit expressed in phystype)  reported  by  the  valuator
64              with the following formula:
65
66              (float)(SI_add + value) * (float)SI_mul / (float)SI_div * pow(2.0, SI_shift);
67
68
69

PHYSICAL UNITS

71       The following physical units are defined for gii_phystype:
72
73       ·   GII_PT_UNKNOWN         : unknown
74
75       ·   GII_PT_TIME            : base unit s (second)
76
77       ·   GII_PT_FREQUENCY       : base unit 1/s (Hz)
78
79       ·   GII_PT_LENGTH          : base unit m (meter)
80
81       ·   GII_PT_VELOCITY        : base unit m/s
82
83       ·   GII_PT_ACCELERATION    : base unit m/s^2
84
85       ·   GII_PT_ANGLE           : base unit radian
86
87       ·   GII_PT_ANGVELOCITY     : base unit radian/s
88
89       ·   GII_PT_ANGACCELERATION : base unit radian/s^2
90
91       ·   GII_PT_AREA            : base unit m^2
92
93       ·   GII_PT_VOLUME          : base unit m^3
94
95       ·   GII_PT_MASS            : base unit kg
96
97       ·   GII_PT_FORCE           : base unit N (kg*m/s^2)
98
99       ·   GII_PT_PRESSURE        : base unit N/m^2 (Pa)
100
101       ·   GII_PT_TORQUE          : base unit Nm
102
103       ·   GII_PT_ENERGY          : base unit Nm, VAs, J
104
105       ·   GII_PT_POWER           : base unit Nm/s, VA, W
106
107       ·   GII_PT_TEMPERATURE     : base unit K
108
109       ·   GII_PT_CURRENT         : base unit A
110
111       ·   GII_PT_VOLTAGE         : base unit V (kg*m^2/(As^3))
112
113       ·   GII_PT_RESISTANCE      : base unit V/A (Ohm)
114
115       ·   GII_PT_CAPACITY        : base unit As/V (Farad)
116
117       ·   GII_PT_INDUCTIVITY     : base unit Vs/A (Henry)
118

SEE ALSO

120       giiQueryValInfo(3)
121
122
123
124libgii-1.0.x                      2006-12-30         gii_cmddata_getvalinfo(3)
Impressum