INET Framework for OMNeT++/OMNEST
inet::units Namespace Reference

Namespaces

 constants
 
 internal
 
 units
 
 values
 

Classes

struct  compose
 
struct  output_unit
 
struct  pow
 
struct  scale
 
struct  translate
 
class  value
 

Typedefs

typedef pow< internal::none, 0 > unit
 

Functions

template<typename Value , typename Unit >
value< Value, pow< Unit,-1 > > operator/ (const Value &a, const value< Value, Unit > &b)
 
template<typename Value , typename Unit >
value< Value, Unit > operator* (const Value &a, const value< Value, Unit > &b)
 
template<typename Value , typename Unit >
value< Value, pow< Unit, 1, 2 > > sqrt (const value< Value, Unit > &a)
 
template<int Num, int Den, typename Value , typename Unit >
value< Value, pow< Unit, Num, Den > > raise (const value< Value, Unit > &a)
 
 UNIT_DISPLAY_NAME (unit,"1")
 
template<typename Value , typename Unit >
std::ostream & operator<< (std::ostream &os, const value< Value, Unit > &value)
 
 UNIT_DISPLAY_NAME (units::m,"m")
 
 UNIT_DISPLAY_NAME (units::kg,"kg")
 
 UNIT_DISPLAY_NAME (units::s,"s")
 
 UNIT_DISPLAY_NAME (units::K,"K")
 
 UNIT_DISPLAY_NAME (units::A,"A")
 
 UNIT_DISPLAY_NAME (units::mol,"mol")
 
 UNIT_DISPLAY_NAME (units::cd,"cd")
 
 UNIT_DISPLAY_NAME (units::rad,"rad")
 
 UNIT_DISPLAY_NAME (units::sr,"sr")
 
 UNIT_DISPLAY_NAME (units::Hz,"Hz")
 
 UNIT_DISPLAY_NAME (units::N,"N")
 
 UNIT_DISPLAY_NAME (units::Pa,"Pa")
 
 UNIT_DISPLAY_NAME (units::J,"J")
 
 UNIT_DISPLAY_NAME (units::W,"W")
 
 UNIT_DISPLAY_NAME (units::C,"C")
 
 UNIT_DISPLAY_NAME (units::V,"V")
 
 UNIT_DISPLAY_NAME (units::F,"F")
 
 UNIT_DISPLAY_NAME (units::Ohm,"Ohm")
 
 UNIT_DISPLAY_NAME (units::S,"S")
 
 UNIT_DISPLAY_NAME (units::Wb,"Wb")
 
 UNIT_DISPLAY_NAME (units::T,"T")
 
 UNIT_DISPLAY_NAME (units::H,"H")
 
 UNIT_DISPLAY_NAME (units::lx,"lx")
 
 UNIT_DISPLAY_NAME (units::Gy,"Gy")
 
 UNIT_DISPLAY_NAME (units::kat,"kat")
 
 UNIT_DISPLAY_NAME (units::cm,"cm")
 
 UNIT_DISPLAY_NAME (units::mm,"mm")
 
 UNIT_DISPLAY_NAME (units::km,"km")
 
 UNIT_DISPLAY_NAME (units::MHz,"MHz")
 
 UNIT_DISPLAY_NAME (units::lb,"lb")
 
 UNIT_DISPLAY_NAME (units::oz,"oz")
 
 UNIT_DISPLAY_NAME (units::tonne,"tonnes")
 
 UNIT_DISPLAY_NAME (units::Celsius,"'C")
 
 UNIT_DISPLAY_NAME (units::Fahrenheit,"'F")
 
 UNIT_DISPLAY_NAME (units::minute,"minutes")
 
 UNIT_DISPLAY_NAME (units::hour,"hours")
 
 UNIT_DISPLAY_NAME (units::day,"days")
 
 UNIT_DISPLAY_NAME (units::week,"weeks")
 
 UNIT_DISPLAY_NAME (units::month,"months")
 
 UNIT_DISPLAY_NAME (units::year,"years")
 
 UNIT_DISPLAY_NAME (units::century,"centuries")
 
 UNIT_DISPLAY_NAME (units::millennium,"millennia")
 
 UNIT_DISPLAY_NAME (units::inch,"inches")
 
 UNIT_DISPLAY_NAME (units::foot,"foot")
 
 UNIT_DISPLAY_NAME (units::yard,"yards")
 
 UNIT_DISPLAY_NAME (units::mile,"miles")
 
 UNIT_DISPLAY_NAME (units::nautical_mile,"nautical miles")
 
 UNIT_DISPLAY_NAME (units::hectare,"ha")
 
 UNIT_DISPLAY_NAME (units::are,"are")
 
 UNIT_DISPLAY_NAME (units::acre,"acres")
 
 UNIT_DISPLAY_NAME (units::ml,"ml")
 
 UNIT_DISPLAY_NAME (units::liter,"l")
 
 UNIT_DISPLAY_NAME (units::dl,"dl")
 
 UNIT_DISPLAY_NAME (units::cl,"cl")
 
 UNIT_DISPLAY_NAME (units::mph,"mph")
 
 UNIT_DISPLAY_NAME (units::mps,"mps")
 
 UNIT_DISPLAY_NAME (units::kph,"km/h")
 
 UNIT_DISPLAY_NAME (units::knot,"knots")
 
 UNIT_DISPLAY_NAME (units::mach,"mach")
 
 UNIT_DISPLAY_NAME (units::degree,"deg")
 
 UNIT_DISPLAY_NAME (units::grad,"grad")
 
 UNIT_DISPLAY_NAME (units::degree_minute,"'")
 
 UNIT_DISPLAY_NAME (units::degree_second,"\"")
 
 UNIT_DISPLAY_NAME (units::kPa,"kPa")
 
 UNIT_DISPLAY_NAME (units::psi,"PSI")
 
 UNIT_DISPLAY_NAME (units::millibar,"millibars")
 
 UNIT_DISPLAY_NAME (units::bps,"bps")
 
 UNIT_DISPLAY_NAME (units::kbps,"kbps")
 
 UNIT_DISPLAY_NAME (units::Mbps,"Mbps")
 
 UNIT_DISPLAY_NAME (units::percent,"%")
 
 UNIT_DISPLAY_NAME (units::rpm,"rpm")
 
 UNIT_DISPLAY_NAME (units::dozen,"dozen")
 
 UNIT_DISPLAY_NAME (units::bakers_dozen,"bakers dozen")
 
template<typename Value , typename Unit >
Value sin (const value< Value, Unit > &angle)
 
template<typename Value , typename Unit >
Value cos (const value< Value, Unit > &angle)
 
template<typename Value , typename Unit >
Value tan (const value< Value, Unit > &angle)
 

Typedef Documentation

typedef pow<internal::none, 0> inet::units::unit

Function Documentation

template<typename Value , typename Unit >
value<Value, Unit> inet::units::operator* ( const Value &  a,
const value< Value, Unit > &  b 
)
242 {
243  return value<Value, Unit>(a * b.get());
244 }
value< double, units::m > b
Definition: Units.h:1054
template<typename Value , typename Unit >
value<Value, pow<Unit, -1> > inet::units::operator/ ( const Value &  a,
const value< Value, Unit > &  b 
)
236 {
237  return value<Value, pow<Unit, -1> >(a / b.get());
238 }
value< double, units::m > b
Definition: Units.h:1054
template<typename Value , typename Unit >
std::ostream& inet::units::operator<< ( std::ostream &  os,
const value< Value, Unit > &  value 
)
723 {
724  os << value.get() << ' ';
725  output_unit<Unit>::fn(os);
726  return os;
727 }
template<int Num, int Den, typename Value , typename Unit >
value<Value, pow<Unit, Num, Den> > inet::units::raise ( const value< Value, Unit > &  a)
254 {
255  return value<Value, pow<Unit, Num, Den> >(internal::fixed_power<Num, Den>::pow(a.get()));
256 }
template<typename Value , typename Unit >
value<Value, pow<Unit, 1, 2> > inet::units::sqrt ( const value< Value, Unit > &  a)

Referenced by inet::physicallayer::MQAMModulationBase::calculateBER(), inet::physicallayer::MPSKModulation::calculateBER(), inet::physicallayer::Ieee80211NistErrorModel::calculatePe(), inet::physicallayer::MQAMModulationBase::calculateSER(), inet::physicallayer::MPSKModulation::calculateSER(), inet::physicallayer::QBPSKModulation::calculateSER(), inet::physicallayer::BPSKModulation::calculateSER(), inet::Sphere::computeIntersection(), inet::physicallayer::RicianFading::computePathLoss(), inet::physicallayer::DielectricObstacleLoss::computeReflectionLoss(), inet::physicallayer::TwoRayInterference::computeTwoRayInterference(), inet::physicallayer::DsssErrorRateModel::DqpskFunction(), inet::physicallayer::Ieee80211NistErrorModel::get16QamBer(), inet::physicallayer::Ieee80211NistErrorModel::get64QamBer(), inet::physicallayer::Ieee80211NistErrorModel::getBpskBer(), inet::physicallayer::Ieee80211YansErrorModel::getBpskBer(), inet::visualizer::VisualizerBase::getContactPosition(), inet::physicallayer::DsssErrorRateModel::GetDsssDqpskCck11SuccessRate(), inet::physicallayer::Ieee80211YansErrorModel::getQamBer(), inet::physicallayer::Ieee80211NistErrorModel::getQpskBer(), inet::physicalenvironment::Material::getRefractiveIndex(), inet::physicallayer::Ieee802154UWBIRReceiver::integrateWindow(), inet::Coord::length(), and inet::GaussMarkovMobility::setTargetPosition().

248 {
249  return value<Value, pow<Unit, 1, 2> >(std::sqrt(a.get()));
250 }
value< Value, pow< Unit, 1, 2 > > sqrt(const value< Value, Unit > &a)
Definition: Units.h:247
template<typename Value , typename Unit >
Value inet::units::tan ( const value< Value, Unit > &  angle)
1208 {
1209  return std::tan(value<Value, units::rad>(angle).get());
1210 }
Value tan(const value< Value, Unit > &angle)
Definition: Units.h:1207
inet::units::UNIT_DISPLAY_NAME ( unit  ,
"1"   
)
inet::units::UNIT_DISPLAY_NAME ( units::m  ,
"m"   
)
inet::units::UNIT_DISPLAY_NAME ( units::kg  ,
"kg"   
)
inet::units::UNIT_DISPLAY_NAME ( units::s  ,
"s"   
)
inet::units::UNIT_DISPLAY_NAME ( units::K  ,
"K"   
)
inet::units::UNIT_DISPLAY_NAME ( units::A  ,
"A"   
)
inet::units::UNIT_DISPLAY_NAME ( units::mol  ,
"mol"   
)
inet::units::UNIT_DISPLAY_NAME ( units::cd  ,
"cd"   
)
inet::units::UNIT_DISPLAY_NAME ( units::rad  ,
"rad"   
)
inet::units::UNIT_DISPLAY_NAME ( units::sr  ,
"sr"   
)
inet::units::UNIT_DISPLAY_NAME ( units::Hz  ,
"Hz"   
)
inet::units::UNIT_DISPLAY_NAME ( units::N  ,
"N"   
)
inet::units::UNIT_DISPLAY_NAME ( units::Pa  ,
"Pa"   
)
inet::units::UNIT_DISPLAY_NAME ( units::J  ,
"J"   
)
inet::units::UNIT_DISPLAY_NAME ( units::W  ,
"W"   
)
inet::units::UNIT_DISPLAY_NAME ( units::C  ,
"C"   
)
inet::units::UNIT_DISPLAY_NAME ( units::V  ,
"V"   
)
inet::units::UNIT_DISPLAY_NAME ( units::F  ,
"F"   
)
inet::units::UNIT_DISPLAY_NAME ( units::Ohm  ,
"Ohm"   
)
inet::units::UNIT_DISPLAY_NAME ( units::S  ,
"S"   
)
inet::units::UNIT_DISPLAY_NAME ( units::Wb  ,
"Wb"   
)
inet::units::UNIT_DISPLAY_NAME ( units::T  ,
"T"   
)
inet::units::UNIT_DISPLAY_NAME ( units::H  ,
"H"   
)
inet::units::UNIT_DISPLAY_NAME ( units::lx  ,
"lx"   
)
inet::units::UNIT_DISPLAY_NAME ( units::Gy  ,
"Gy"   
)
inet::units::UNIT_DISPLAY_NAME ( units::kat  ,
"kat"   
)
inet::units::UNIT_DISPLAY_NAME ( units::cm  ,
"cm"   
)
inet::units::UNIT_DISPLAY_NAME ( units::mm  ,
"mm"   
)
inet::units::UNIT_DISPLAY_NAME ( units::km  ,
"km"   
)
inet::units::UNIT_DISPLAY_NAME ( units::MHz  ,
"MHz"   
)
inet::units::UNIT_DISPLAY_NAME ( units::lb  ,
"lb"   
)
inet::units::UNIT_DISPLAY_NAME ( units::oz  ,
"oz"   
)
inet::units::UNIT_DISPLAY_NAME ( units::tonne  ,
"tonnes"   
)
inet::units::UNIT_DISPLAY_NAME ( units::Celsius  ,
"'C"   
)
inet::units::UNIT_DISPLAY_NAME ( units::Fahrenheit  ,
"'F"   
)
inet::units::UNIT_DISPLAY_NAME ( units::minute  ,
"minutes"   
)
inet::units::UNIT_DISPLAY_NAME ( units::hour  ,
"hours"   
)
inet::units::UNIT_DISPLAY_NAME ( units::day  ,
"days"   
)
inet::units::UNIT_DISPLAY_NAME ( units::week  ,
"weeks"   
)
inet::units::UNIT_DISPLAY_NAME ( units::month  ,
"months"   
)
inet::units::UNIT_DISPLAY_NAME ( units::year  ,
"years"   
)
inet::units::UNIT_DISPLAY_NAME ( units::century  ,
"centuries"   
)
inet::units::UNIT_DISPLAY_NAME ( units::millennium  ,
"millennia"   
)
inet::units::UNIT_DISPLAY_NAME ( units::inch  ,
"inches"   
)
inet::units::UNIT_DISPLAY_NAME ( units::foot  ,
"foot"   
)
inet::units::UNIT_DISPLAY_NAME ( units::yard  ,
"yards"   
)
inet::units::UNIT_DISPLAY_NAME ( units::mile  ,
"miles"   
)
inet::units::UNIT_DISPLAY_NAME ( units::nautical_mile  ,
"nautical miles"   
)
inet::units::UNIT_DISPLAY_NAME ( units::hectare  ,
"ha"   
)
inet::units::UNIT_DISPLAY_NAME ( units::are  ,
"are"   
)
inet::units::UNIT_DISPLAY_NAME ( units::acre  ,
"acres"   
)
inet::units::UNIT_DISPLAY_NAME ( units::ml  ,
"ml"   
)
inet::units::UNIT_DISPLAY_NAME ( units::liter  ,
"l"   
)
inet::units::UNIT_DISPLAY_NAME ( units::dl  ,
"dl"   
)
inet::units::UNIT_DISPLAY_NAME ( units::cl  ,
"cl"   
)
inet::units::UNIT_DISPLAY_NAME ( units::mph  ,
"mph"   
)
inet::units::UNIT_DISPLAY_NAME ( units::mps  ,
"mps"   
)
inet::units::UNIT_DISPLAY_NAME ( units::kph  ,
"km/h"   
)
inet::units::UNIT_DISPLAY_NAME ( units::knot  ,
"knots"   
)
inet::units::UNIT_DISPLAY_NAME ( units::mach  ,
"mach"   
)
inet::units::UNIT_DISPLAY_NAME ( units::degree  ,
"deg"   
)
inet::units::UNIT_DISPLAY_NAME ( units::grad  ,
"grad"   
)
inet::units::UNIT_DISPLAY_NAME ( units::degree_minute  ,
"'"   
)
inet::units::UNIT_DISPLAY_NAME ( units::degree_second  ,
"\""   
)
inet::units::UNIT_DISPLAY_NAME ( units::kPa  ,
"kPa"   
)
inet::units::UNIT_DISPLAY_NAME ( units::psi  ,
"PSI"   
)
inet::units::UNIT_DISPLAY_NAME ( units::millibar  ,
"millibars"   
)
inet::units::UNIT_DISPLAY_NAME ( units::bps  ,
"bps"   
)
inet::units::UNIT_DISPLAY_NAME ( units::kbps  ,
"kbps"   
)
inet::units::UNIT_DISPLAY_NAME ( units::Mbps  ,
"Mbps"   
)
inet::units::UNIT_DISPLAY_NAME ( units::percent  ,
"%"   
)
inet::units::UNIT_DISPLAY_NAME ( units::rpm  ,
"rpm"   
)
inet::units::UNIT_DISPLAY_NAME ( units::dozen  ,
"dozen"   
)
inet::units::UNIT_DISPLAY_NAME ( units::bakers_dozen  ,
"bakers dozen  
)