pub enum Unit {
Show 34 variants
A,
ASU,
B,
Celsius,
DB,
DBm,
Deg,
Fahrenheit,
Hz,
MHz,
K,
Lx,
M,
Ms2,
N,
Ohm,
KPa,
Percent,
RH,
RPM,
S,
V,
VA,
KVA,
VAh,
KVAh,
Var,
Kvar,
Varh,
Kvarh,
W,
KW,
Wh,
KWh,
}Expand description
Standardized UnitOfMeasure.unit values.
Named Unit rather than UnitOfMeasure to leave that name to the schema-generated struct of the same name in common.
A closed set: it holds only the values the specification
defines. The wire field is a string, so a deployment can still
send something else – from_wire returns None for that,
which is not by itself a protocol error.
Variants§
A
Amperes (current)
ASU
Arbitrary Strength Unit (Signal Strength)
B
Bytes
Celsius
Degrees (temperature)
DB
Decibel (for example Signal Strength)
DBm
Power relative to 1mW (^10^log(P/1mW))
Deg
Degrees (angle/rotation)
Fahrenheit
Degrees (temperature)
Hz
Hertz (frequency)
MHz
milliHertz (frequency)
K
Degrees Kelvin (temperature)
Lx
Lux (Light Intensity)
M
Meter (length)
Ms2
m/s^2^ (Acceleration)
N
Newtons (Force)
Ohm
Ohm (Impedance)
KPa
kiloPascal (Pressure)
Percent
Percentage
RH
Relative Humidity%
RPM
Revolutions per Minute
S
Seconds (Time)
V
Voltage (DC or r.m.s. AC)
VA
Volt-Ampere (apparent power)
KVA
kiloVolt-Ampere (apparent power)
VAh
Volt-Ampere-hours (apparent energy)
KVAh
kiloVolt-Ampere-hours (apparent energy)
Var
vars (reactive power)
Kvar
kilovars (reactive power)
Varh
var-hours (reactive energy)
Kvarh
kilovar-hours (reactive energy)
W
Watts (power)
KW
kilowatts (power)
Wh
Watt-hours (energy). Default
KWh
kilowatt-hours (energy)