---
name: "gii_cmddata_getvalinfo"
section: "3"
platform: "linux"
package: "libgii1"
version: "1:1.0.2-4.1"
release: "Debian 7 (Wheezy)"
platforms: ["linux"]
url: "https://new.carta.tech/gii_cmddata_getvalinfo"
---

# gii\_cmddata\_getvalinfo(3)

GII valuators description

## NAME

**gii\_cmddata\_getvalinfo**, **gii\_phystype**, **gii\_valrange** - GII valuators description

## SYNOPSIS

```
#include <ggi/events.h>
typedef struct gii_valrange {
    int32_t           min, center, max;
} gii_valrange;
typedef struct {
    uint32_t          number;
    char              longname[75];
    char              shortname[5];
    gii_valrange      range;
    gii_phystype      phystype;
    int32_t           SI_add,SI_mul,SI_div,SI_shift;
} gii_cmddata_getvalinfo;
```

## DESCRIPTION

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

## STRUCTURE MEMBERS

**gii\_cmddata\_getvalinfo** fields are defined as follow:

- **number**

  Number of the queried valuator.

- **longname**

  A human-redable NULL terminated string identifying the valuator.

- **shortname**

  A NULL terminated abbreviated name for this valuator.

- **range**

  Contains the minimum, center and maximum values for this valuator. Note that this range may change on some devices due to calibration, but it is usually not expected that a device recalibrates while in use. You should react gracefully to values received from the valuator that are outside the specified range, though.

- **phystype**

  Gives the physical quantity the device measures. The idea is to report the thing the user actually controls. I.e. a Joystick actually measures resistance, but should report **GII\_PT\_ANGLE** or **GII\_PT\_FORCE**, as that is what the user does to the stick and what results in the changed resistance.

- **SI\_add**, **SI\_mul**, **SI\_div**, **SI\_shift**

  Using these values, it is possible to give calibration data to the application or to compute the actual floating point value (in the unit expressed in **phystype**) reported by the valuator with the following formula:

  ```
  (float)(SI_add + value) * (float)SI_mul / (float)SI_div * pow(2.0, SI_shift);
  ```

## PHYSICAL UNITS

The following physical units are defined for **gii\_phystype**:

- •

  **GII\_PT\_UNKNOWN**         : unknown

- •

  **GII\_PT\_TIME**            : base unit s (second)

- •

  **GII\_PT\_FREQUENCY**       : base unit 1/s (Hz)

- •

  **GII\_PT\_LENGTH**          : base unit m (meter)

- •

  **GII\_PT\_VELOCITY**        : base unit m/s

- •

  **GII\_PT\_ACCELERATION**    : base unit m/s^2

- •

  **GII\_PT\_ANGLE**           : base unit radian

- •

  **GII\_PT\_ANGVELOCITY**     : base unit radian/s

- •

  **GII\_PT\_ANGACCELERATION** : base unit radian/s^2

- •

  **GII\_PT\_AREA**            : base unit m^2

- •

  **GII\_PT\_VOLUME**          : base unit m^3

- •

  **GII\_PT\_MASS**            : base unit kg

- •

  **GII\_PT\_FORCE**           : base unit N (kg\*m/s^2)

- •

  **GII\_PT\_PRESSURE**        : base unit N/m^2 (Pa)

- •

  **GII\_PT\_TORQUE**          : base unit Nm

- •

  **GII\_PT\_ENERGY**          : base unit Nm, VAs, J

- •

  **GII\_PT\_POWER**           : base unit Nm/s, VA, W

- •

  **GII\_PT\_TEMPERATURE**     : base unit K

- •

  **GII\_PT\_CURRENT**         : base unit A

- •

  **GII\_PT\_VOLTAGE**         : base unit V (kg\*m^2/(As^3))

- •

  **GII\_PT\_RESISTANCE**      : base unit V/A (Ohm)

- •

  **GII\_PT\_CAPACITY**        : base unit As/V (Farad)

- •

  **GII\_PT\_INDUCTIVITY**     : base unit Vs/A (Henry)

## SEE ALSO

`giiQueryValInfo(3)`
