Enum ecu_diagnostics::uds::ScalingByteExtension
source · #[repr(u8)]pub enum ScalingByteExtension {
Show 89 variants
NoUnit = 0,
Meter = 1,
Foot = 2,
Inch = 3,
Yard = 4,
Mile = 5,
Gram = 6,
Tonne = 7,
Second = 8,
Minute = 9,
Hour = 10,
Day = 11,
Year = 12,
Ampere = 13,
Volt = 14,
Coulomb = 15,
Ohm = 16,
Farad = 17,
Henry = 18,
Siemens = 19,
Weber = 20,
Tesla = 21,
Kelvin = 22,
Celsius = 23,
Fahrenheit = 24,
Candela = 25,
Radian = 26,
Degree = 27,
Hertz = 28,
Joule = 29,
Newton = 30,
Kilopond = 31,
PoundForce = 32,
Watt = 33,
HorsePowerMetric = 34,
HorsePowerImperial = 35,
Pascal = 36,
Bar = 37,
Atmosphere = 38,
Psi = 39,
Becquerel = 40,
Lumen = 41,
Lux = 42,
Liter = 43,
GallonImperial = 44,
GallonUs = 45,
CubicInch = 46,
MeterPerSecond = 47,
KilometerPerHour = 48,
MilePerHour = 49,
RevolutionsPerSecond = 50,
RevolutionsPerMinute = 51,
Counts = 52,
Percent = 53,
MilligramPerStroke = 54,
MeterPerSquareSecond = 55,
NewtonMeter = 56,
LiterPerMinute = 57,
WattPerSquareMeter = 58,
BarPerSecond = 59,
RadiansPerSecond = 60,
RadiansPerSquareSecond = 61,
KilogramsPerSquareMeter = 62,
Exa = 64,
Peta = 65,
Tera = 66,
Giga = 67,
Mega = 68,
Kilo = 69,
Hecto = 70,
Deca = 71,
Deci = 72,
Centi = 73,
Milli = 74,
Micro = 75,
Nano = 76,
Pico = 77,
Femto = 78,
Atto = 79,
Date1 = 80,
Date2 = 81,
Date3 = 82,
Week = 83,
Time1 = 84,
Time2 = 85,
DateAndTime1 = 86,
DateAndTime2 = 87,
DateAndTime3 = 88,
DateAndTime4 = 89,
}
Expand description
! Functions and data for ReadScalingDataById UDS Service
FIXME: Use ScalingExtension instead
Note: #[deprecated]
doesn’t work here due to https://github.com/rust-lang/rust/issues/30827
Scaling data byte extensions
This enum is used to represent the following:
- Measurement units
- Format specifiers
- Unit scale prefixes
Due to this, each value specifies if it will return a Postfix or prefix.
Use ScalingExtension::get_postfix
to return the optional postfix of the scaling byte,
or ScalingExtension::get_prefix
to return the optional prefix of the scaling byte.
Variants§
NoUnit = 0
No unit or presentation
Meter = 1
Meter - measure of length.
Postfix m
Foot = 2
Foot - measure of length.
Postfix ft
Inch = 3
Inch - measure of length.
Postfix in
Yard = 4
Yard - measure of length.
Postfix yd
Mile = 5
English mile - measure of length.
Postfix mi
Gram = 6
Gram - measure of mass.
Postfix g
Tonne = 7
Metric tonne - measure of mass.
Postfix t
Second = 8
Second - measure of time.
Postfix s
Minute = 9
Minute - measure of time.
Postfix min
Hour = 10
Hour - measure of time.
Postfix h
Day = 11
Day - measure of time.
Postfix d
Year = 12
Year - measure of time.
Postfix y
Ampere = 13
Ampere - measure of current.
Postfix A
Volt = 14
Volt - measure of voltage.
Postfix V
Coulomb = 15
Coulomb - measure of electric charge.
Postfix C
Ohm = 16
Ohm - measure of resistance.
Postfix W
Farad = 17
Farad - measure of capacitance.
Postfix F
Henry = 18
Henry - measure of inductance.
Postfix H
Siemens = 19
Siemens - measure of electric conductance.
Postfix S
Weber = 20
Weber - measure of magnetic flux.
Postfix Wb
Tesla = 21
Tesla - measure of magnetic flux density.
Postfix T
Kelvin = 22
Kelvin - measure of thermodynamic temperature.
Postfix K
Celsius = 23
Celsius - measure of thermodynamic temperature.
Postfix °C
Fahrenheit = 24
Fahrenheit - measure of thermodynamic temperature.
Postfix °F
Candela = 25
Candela - measure of luminous intensity.
Postfix cd
Radian = 26
Radians - measure of plane angle.
Postfix rad
Degree = 27
Degrees - measure of plane angle.
Postfix °
Hertz = 28
Hertz - measure of frequency.
Postfix Hz
Joule = 29
Joule - measure of energy.
Postfix J
Newton = 30
Newton - measure of force.
Postfix N
Kilopond = 31
Kilopond - measure of force.
Postfix kp
PoundForce = 32
Pound force - measure of force.
Postfix lbf
Watt = 33
Watt - measure of power.
Postfix W
HorsePowerMetric = 34
Metric horse power - measure of power.
Postfix hk
HorsePowerImperial = 35
Imperial horse power - measure of power.
Postfix hp
Pascal = 36
Pascal - measure of pressure.
Postfix Pa
Bar = 37
Bar - measure of pressure.
Postfix bar
Atmosphere = 38
Atmosphere - measure of pressure.
Postfix atm
Psi = 39
Pound force per square inch - measure of pressure.
Postfix psi
Becquerel = 40
Becquerel - measure of radioactivity.
Postfix Bq
Lumen = 41
Lumen - measure of light flux.
Postfix lm
Lux = 42
Lux - measure of illuminance.
Postfix lx
Liter = 43
Liter - measure of volume.
Postfix l
GallonImperial = 44
British gallon - measure of volume.
GallonUs = 45
US liquid gallon - measure of volume.
CubicInch = 46
Cubic inch - measure of volume.
Postfix cu in
MeterPerSecond = 47
Meter per second - measure of speed.
Postfix m/s
KilometerPerHour = 48
Kilometers per hour - measure of speed.
Postfix km/h
MilePerHour = 49
Miles per hour - measure of speed.
Postfix mph
RevolutionsPerSecond = 50
Revolutions per second - measure of angular velocity.
Postfix rps
RevolutionsPerMinute = 51
Revolutions per minute - measure of angular velocity.
Postfix rpm
Counts = 52
Count.
Percent = 53
Percent.
Postfix %
MilligramPerStroke = 54
Milligram per stroke - measure of mass per engine stroke.
Postfix mg/stroke
MeterPerSquareSecond = 55
Meter per square second - measure of acceleration.
Postfix m/s²
NewtonMeter = 56
Newton meter - measure of moment (e.g. torsion moment).
Postfix Nm
LiterPerMinute = 57
Liter per minute - measure of flow.
Postfix l/min
WattPerSquareMeter = 58
Watt per square meter W/m2 Intensity - measure of Intensity.
Postfix W/m²
BarPerSecond = 59
Bar per second - measure of pressure change.
Postfix bar/s
RadiansPerSecond = 60
Radians per second - measure of angular velocity.
Postfix rad/s
RadiansPerSquareSecond = 61
Radians per square second - measure of angular acceleration.
Postfix rad/s²
KilogramsPerSquareMeter = 62
Kilograms per square meter.
Postfix kg/m²
Exa = 64
Exa 10^18
Prefix E
Peta = 65
Peta 10^15
Prefix P
Tera = 66
Tera 10^12
Prefix T
Giga = 67
Giga 10^9
Prefix G
Mega = 68
Mega 10^6
Prefix M
Kilo = 69
Kilo 10^3
Prefix k
Hecto = 70
Hecto 10^2
Prefix h
Deca = 71
Deca 10^1
Prefix da
Deci = 72
Deci 10^-1
Prefix d
Centi = 73
Centi 10^-2
Prefix c
Milli = 74
Milli 10^-3
Prefix m
Micro = 75
Micro 10^-6
Prefix m
Nano = 76
Nano 10^-9
Prefix n
Pico = 77
Pico 10^-12
Prefix p
Femto = 78
Femto 10^-15
Prefix f
Atto = 79
Atto 10^-18
Prefix a
Date1 = 80
Date in Year-Month-Day
format.
Date2 = 81
Date in Day/Month/Year
format.
Date3 = 82
Date in Month/Day/Year
format.
Week = 83
Calendar week.
Postfix W
Time1 = 84
Time in UTC Hour/Minute/Second
format.
Time2 = 85
Time in Hour/Minute/Second
format.
DateAndTime1 = 86
Date and time1 in Second/Minute/Hour/Day/Month/Year
format.
DateAndTime2 = 87
DateAndTime2 in Second/Minute/Hour/Day/Month/Year/Local minute offset/Local hour offset
format.
DateAndTime3 = 88
DateAndTime3 in Second/Minute/Hour/Month/Day/Year
format.
DateAndTime4 = 89
DateAndTime4 in Second/Minute/Hour/Month/Day/Year/Local minute offset/Local hour offset
format.
Implementations§
source§impl ScalingExtension
impl ScalingExtension
sourcepub fn get_postfix(&self) -> Option<&'static str>
pub fn get_postfix(&self) -> Option<&'static str>
Returns the optional postfix of the scaling byte
sourcepub fn get_prefix(&self) -> Option<&'static str>
pub fn get_prefix(&self) -> Option<&'static str>
Returns the optional prefix of the scaling byte
Trait Implementations§
source§impl Clone for ScalingExtension
impl Clone for ScalingExtension
source§fn clone(&self) -> ScalingExtension
fn clone(&self) -> ScalingExtension
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ScalingExtension
impl Debug for ScalingExtension
source§impl From<ScalingExtension> for ByteWrapper<ScalingExtension>
impl From<ScalingExtension> for ByteWrapper<ScalingExtension>
source§fn from(value: ScalingExtension) -> ByteWrapper<ScalingExtension>
fn from(value: ScalingExtension) -> ByteWrapper<ScalingExtension>
source§impl Ord for ScalingExtension
impl Ord for ScalingExtension
source§fn cmp(&self, other: &ScalingExtension) -> Ordering
fn cmp(&self, other: &ScalingExtension) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq for ScalingExtension
impl PartialEq for ScalingExtension
source§fn eq(&self, other: &ScalingExtension) -> bool
fn eq(&self, other: &ScalingExtension) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for ScalingExtension
impl PartialOrd for ScalingExtension
source§fn partial_cmp(&self, other: &ScalingExtension) -> Option<Ordering>
fn partial_cmp(&self, other: &ScalingExtension) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read more