pub enum ScalingByteExtension {
Show 89 variants NoUnit, Meter, Foot, Inch, Yard, EngMile, Gram, MetricTon, Second, Minute, Hour, Day, Year, Ampere, Volt, Coulomb, Ohm, Farad, Henry, Siemens, Weber, Tesla, Kelvin, Celsius, Fahrenheit, Candela, Radian, Degree, Hertz, Joule, Newton, Kilopond, PoundForce, Watt, MetricHorsePower, UsHorsePower, Pascal, Bar, Atmosphere, Psi, Becquerel, Lumen, Lux, Liter, UKGallon, USGallon, CubicInch, MeterPerSecond, KilometrePerHour, MilePerHour, RevolutionsPerSecond, RevolutionsPerMinute, Counts, Percent, MilligramsPerStroke, MeterPerSquareSecond, NewtonMeter, LiterPerMinute, WattPerSquareMeter, BarPerSecond, RadiansPerSecond, RadiansPerSquareSecond, KilogramsPerSquareMeter, Exa, Peta, Tera, Giga, Mega, Kilo, Hecto, Deca, Deci, Centi, Milli, Micro, Nano, Pico, Femto, Atto, Date1, Date2, Date3, Week, Time1, Time2, DateAndTime1, DateAndTime2, DateAndTime3, DateAndTime4,
}
Expand description

! Functions and data for ReadScalingDataById UDS Service Scaling data byte extensions This enum is used to represent the following:

  1. Measurement units
  2. Format specifiers
  3. Unit scale prefixes

Due to this, each value specifies if it will return a Postfix or prefix. Use ScalingByteExtension::get_postfix to return the optional postfix of the scaling byte, or ScalingByteExtension::get_prefix to return the optional prefix of the scaling byte.

Variants

NoUnit

No unit or presentation

Meter

Meter - Measure of length. Postfix: m

Foot

Foot - Measure of length. Postfix: ft

Inch

Inch - Measure of length. Postfix: in

Yard

Yard - Measure of length. Postfix: yd

EngMile

English mile - Measure of length. Postfix: mi

Gram

Gram - Measure of mass. Postfix: g

MetricTon

Metric ton - Measure of mass. Postfix: t

Second

Second - Measure of time. Postfix: s

Minute

Minute - Measure of time. Postfix: min

Hour

Hour - Measure of time. Postfix: h

Day

Day - Measure of time. Postfix: d

Year

Year - Measure of time. Postfix: y

Ampere

Ampere - Measure of electrical current. Postfix: A

Volt

Volt - Measure of electrical voltage. Postfix: V

Coulomb

Coulomb - Measure of electrical charge. Postfix: C

Ohm

Ohm - Measure of electrical resistance. Postfix: W

Farad

Farad - Measure of electrical capacitance. Postfix: F

Henry

Henry - Measure of electrical inductance. Postfix: H

Siemens

Siemens - Measure of electrical conductance. Postfix: S

Weber

Weber - Measure of magnetic flux. Postfix: Wb

Tesla

Tesla - Measure of magnetic flux density. Postfix: T

Kelvin

Kelvin - Measure of thermodynamic temperature. Postfix: K

Celsius

Kelvin - Measure of thermodynamic temperature. Postfix: °C

Fahrenheit

Kelvin - Measure of thermodynamic temperature. Postfix: °F

Candela

Candela - Measure of luminous intensity. Postfix: cd

Radian

Radians - Measure of plane angle. Postfix: Rad

Degree

Degrees - Measure of plane angle. Postfix: °

Hertz

Hertz - Measure of frequency. Postfix: Hz

Joule

Joule - Measure of energy. Postfix: J

Newton

Newton - Measure of force. Postfix: N

Kilopond

Kilo-pond - Measure of force. Postfix: kp

PoundForce

Pound force - Measure of force. Postfix: lbf

Watt

Watt - Measure of power. Postfix: W

MetricHorsePower

Metric horse power - Measure of power. Postfix: hk

UsHorsePower

US/UK Horse power - Measure of power. Postfix: hp

Pascal

Pascal - Measure of pressure. Postfix: Pa

Bar

Bar - Measure of pressure. Postfix: bar

Atmosphere

Atmosphere - Measure of pressure. Postfix: atm

Psi

Pound force per square inch - Measure of pressure. Postfix: psi

Becquerel

Becquerel - Measure of radioactivity. Postfix: Bq

Lumen

Lumen - Measure of light lux. Postfix: lm

Lux

Lux - Measure of illuminance. Postfix: lx

Liter

Liter - Measure of volume. Postfix: l

UKGallon

British gallon - Measure of volume. No Postfix or prefix is used

USGallon

US liquid gallon - Measure of volume. No Postfix or prefix is used

CubicInch

Cubic inch - Measure of volume. Postfix: cu in

MeterPerSecond

Meter per second - Measure of speed. Postfix: m/s

KilometrePerHour

Kilometers per hour - Measure of speed. Postfix: km/s

MilePerHour

Miles per hour - Measure of speed. Postfix: mph

RevolutionsPerSecond

Revolutions per second - Measure of angular velocity. Postfix: rps

RevolutionsPerMinute

Revolutions per minute - Measure of angular velocity. Postfix: rpm

Counts

Count. No Postfix or prefix is used

Percent

Percent. Postfix: %

MilligramsPerStroke

Milligrams per stroke - Measure of mass per engine stroke. Postfix: mg/stroke

MeterPerSquareSecond

Meters per square second - Measure of acceleration. Postfix: m/s2

NewtonMeter

Newton meter - Measure of torsion moment. Postfix: Nm

LiterPerMinute

Liters per minute - Measure of flow. Postfix: l/min

WattPerSquareMeter

Watts per square meter - Measure of intensity. Postfix: W/m2

BarPerSecond

Bar per second - Measure of pressure change. Postfix: bar/s

RadiansPerSecond

Radians per second - Measure of angular velocity. Postfix: rad/s2

RadiansPerSquareSecond

Radians per square second - Measure of angular acceleration. Postfix: rad/s2

KilogramsPerSquareMeter

Kilograms per square meter - Postfix: kg/m2

Exa

Exa prefix - Prefix: E

Peta

Peta prefix - Prefix P

Tera

Tera prefix - Prefix T

Giga

Giga prefix - Prefix G

Mega

Mega prefix - Prefix M

Kilo

Kilo prefix - Prefix k

Hecto

hecto prefix - Prefix h

Deca

Deca prefix - Prefix da

Deci

Deci prefix - Prefix d

Centi

Centi prefix - Prefix c

Milli

Milli prefix - Prefix m

Micro

micro prefix - Prefix m

Nano

Nano prefix - Prefix n

Pico

Pico prefix - Prefix p

Femto

Femto prefix - Prefix f

Atto

Atto prefix - Prefix: a

Date1

Year-Month-Day

Date2

Day / Month / Year

Date3

Month / Day / Year

Week

Calendar week

Time1

UTC Hour / Minute / Second

Time2

Hour / Minute / Second

DateAndTime1

Second / Minute / Hour / Day / Month / Year

DateAndTime2

Second / Minute / Hour / Day / Month / Year / Local minute offset / Local hour offset

DateAndTime3

Second / Minute/ Hour / Day / Month / Year

DateAndTime4

Second / Minute / Hour / Day / Year / Local minute offset / Local hour offset

Implementations

Returns a short string describing the scaling byte extension

Returns the optional postfix of the scaling byte

Returns the optional prefix of the scaling byte

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Converts to this type from the input type.

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

Restrict a value to a certain interval. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.