Next: , Previous: , Up: Inputs, Outputs, and Bindings   [Contents]


6.8.3 unit attribute

The unit attribute is the lowercase token returned by st_unit_to_string / accepted by st_unit_from_string in libstarter-core. Parsing is case-insensitive; surrounding whitespace is stripped. Unknown tokens are a hard config error.

null

Dimensionless / unspecified.

celsius / fahrenheit / kelvin

Temperature.

percent

Percentage.

bar / pa / hpa / kpa / mpa / mbar / psi / atm

Pressure.

onoff

Binary 0/1.

enum

Discrete enumerated value (numeric index).

v / mv / kv

Voltage.

a / ma / ka

Current.

ohm

Resistance.

hz

Frequency.

w / kw / mw

Active power.

var / kvar

Reactive power.

va / kva

Apparent power.

wh / kwh

Energy (watt-hour family).

j / kj / mj

Energy (joule family).

seconds / minutes / hours / ms / days

Time.

mm / cm / m / km

Length.

m2

Area (square metre).

ml / l / m3

Volume.

g / kg / t

Mass.

m_s / km_h

Speed.

rpm

Rotational speed.

l_min / m3_h

Volumetric flow.

degree / radian

Angle.

lux

Illuminance.

ppm / ppb

Concentration.

db / dba

Level / A-weighted sound level.

ph

Acidity.

count / ratio

Dimensionless count or ratio.

bps / kbps / mbps

Bit rate.

byte / kib / mib / gib

Data size.