WPILibC++ 2023.4.3-108-ge5452e3
units::base_unit< Meter, Kilogram, Second, Radian, Ampere, Kelvin, Mole, Candela, Byte > Struct Template Reference

Class representing SI base unit types. More...

#include <units/base.h>

Inheritance diagram for units::base_unit< Meter, Kilogram, Second, Radian, Ampere, Kelvin, Mole, Candela, Byte >:

Public Types

typedef Meter meter_ratio
 
typedef Kilogram kilogram_ratio
 
typedef Second second_ratio
 
typedef Radian radian_ratio
 
typedef Ampere ampere_ratio
 
typedef Kelvin kelvin_ratio
 
typedef Mole mole_ratio
 
typedef Candela candela_ratio
 
typedef Byte byte_ratio
 

Detailed Description

template<class Meter = detail::meter_ratio<0>, class Kilogram = std::ratio<0>, class Second = std::ratio<0>, class Radian = std::ratio<0>, class Ampere = std::ratio<0>, class Kelvin = std::ratio<0>, class Mole = std::ratio<0>, class Candela = std::ratio<0>, class Byte = std::ratio<0>>
struct units::base_unit< Meter, Kilogram, Second, Radian, Ampere, Kelvin, Mole, Candela, Byte >

Class representing SI base unit types.

Base units are represented by a combination of std::ratio template parameters, each describing the exponent of the type of unit they represent. Example: meters per second would be described by a +1 exponent for meters, and a -1 exponent for seconds, thus: base_unit<std::ratio<1>, std::ratio<0>, std::ratio<-1>>

Template Parameters
Meterstd::ratio representing the exponent value for meters.
Kilogramstd::ratio representing the exponent value for kilograms.
Secondstd::ratio representing the exponent value for seconds.
Radianstd::ratio representing the exponent value for radians. Although radians are not SI base units, they are included because radians are described by the SI as m * m^-1, which would make them indistinguishable from scalars.
Amperestd::ratio representing the exponent value for amperes.
Kelvinstd::ratio representing the exponent value for Kelvin.
Molestd::ratio representing the exponent value for moles.
Candelastd::ratio representing the exponent value for candelas.
Bytestd::ratio representing the exponent value for bytes.
See also
category for type aliases for SI base_unit types.

Member Typedef Documentation

◆ ampere_ratio

template<class Meter = detail::meter_ratio<0>, class Kilogram = std::ratio<0>, class Second = std::ratio<0>, class Radian = std::ratio<0>, class Ampere = std::ratio<0>, class Kelvin = std::ratio<0>, class Mole = std::ratio<0>, class Candela = std::ratio<0>, class Byte = std::ratio<0>>
typedef Ampere units::base_unit< Meter, Kilogram, Second, Radian, Ampere, Kelvin, Mole, Candela, Byte >::ampere_ratio

◆ byte_ratio

template<class Meter = detail::meter_ratio<0>, class Kilogram = std::ratio<0>, class Second = std::ratio<0>, class Radian = std::ratio<0>, class Ampere = std::ratio<0>, class Kelvin = std::ratio<0>, class Mole = std::ratio<0>, class Candela = std::ratio<0>, class Byte = std::ratio<0>>
typedef Byte units::base_unit< Meter, Kilogram, Second, Radian, Ampere, Kelvin, Mole, Candela, Byte >::byte_ratio

◆ candela_ratio

template<class Meter = detail::meter_ratio<0>, class Kilogram = std::ratio<0>, class Second = std::ratio<0>, class Radian = std::ratio<0>, class Ampere = std::ratio<0>, class Kelvin = std::ratio<0>, class Mole = std::ratio<0>, class Candela = std::ratio<0>, class Byte = std::ratio<0>>
typedef Candela units::base_unit< Meter, Kilogram, Second, Radian, Ampere, Kelvin, Mole, Candela, Byte >::candela_ratio

◆ kelvin_ratio

template<class Meter = detail::meter_ratio<0>, class Kilogram = std::ratio<0>, class Second = std::ratio<0>, class Radian = std::ratio<0>, class Ampere = std::ratio<0>, class Kelvin = std::ratio<0>, class Mole = std::ratio<0>, class Candela = std::ratio<0>, class Byte = std::ratio<0>>
typedef Kelvin units::base_unit< Meter, Kilogram, Second, Radian, Ampere, Kelvin, Mole, Candela, Byte >::kelvin_ratio

◆ kilogram_ratio

template<class Meter = detail::meter_ratio<0>, class Kilogram = std::ratio<0>, class Second = std::ratio<0>, class Radian = std::ratio<0>, class Ampere = std::ratio<0>, class Kelvin = std::ratio<0>, class Mole = std::ratio<0>, class Candela = std::ratio<0>, class Byte = std::ratio<0>>
typedef Kilogram units::base_unit< Meter, Kilogram, Second, Radian, Ampere, Kelvin, Mole, Candela, Byte >::kilogram_ratio

◆ meter_ratio

template<class Meter = detail::meter_ratio<0>, class Kilogram = std::ratio<0>, class Second = std::ratio<0>, class Radian = std::ratio<0>, class Ampere = std::ratio<0>, class Kelvin = std::ratio<0>, class Mole = std::ratio<0>, class Candela = std::ratio<0>, class Byte = std::ratio<0>>
typedef Meter units::base_unit< Meter, Kilogram, Second, Radian, Ampere, Kelvin, Mole, Candela, Byte >::meter_ratio

◆ mole_ratio

template<class Meter = detail::meter_ratio<0>, class Kilogram = std::ratio<0>, class Second = std::ratio<0>, class Radian = std::ratio<0>, class Ampere = std::ratio<0>, class Kelvin = std::ratio<0>, class Mole = std::ratio<0>, class Candela = std::ratio<0>, class Byte = std::ratio<0>>
typedef Mole units::base_unit< Meter, Kilogram, Second, Radian, Ampere, Kelvin, Mole, Candela, Byte >::mole_ratio

◆ radian_ratio

template<class Meter = detail::meter_ratio<0>, class Kilogram = std::ratio<0>, class Second = std::ratio<0>, class Radian = std::ratio<0>, class Ampere = std::ratio<0>, class Kelvin = std::ratio<0>, class Mole = std::ratio<0>, class Candela = std::ratio<0>, class Byte = std::ratio<0>>
typedef Radian units::base_unit< Meter, Kilogram, Second, Radian, Ampere, Kelvin, Mole, Candela, Byte >::radian_ratio

◆ second_ratio

template<class Meter = detail::meter_ratio<0>, class Kilogram = std::ratio<0>, class Second = std::ratio<0>, class Radian = std::ratio<0>, class Ampere = std::ratio<0>, class Kelvin = std::ratio<0>, class Mole = std::ratio<0>, class Candela = std::ratio<0>, class Byte = std::ratio<0>>
typedef Second units::base_unit< Meter, Kilogram, Second, Radian, Ampere, Kelvin, Mole, Candela, Byte >::second_ratio

The documentation for this struct was generated from the following file: