INET Framework for OMNeT++/OMNEST
inet::physicallayer::mixim::math::mW2dBm< T, true > Struct Template Reference

#include <MappingBase.h>

Public Member Functions

T operator() (const T &mW)
 

Member Function Documentation

template<typename T >
T inet::physicallayer::mixim::math::mW2dBm< T, true >::operator() ( const T mW)
inline
845  {
846  typedef std::numeric_limits<T> tnumlimits_for_v;
847  // we have possible infinity values, so that we can do some checks
848  const T cInf = tnumlimits_for_v::infinity();
849  const bool bIsInf = (mW == cInf) || (tnumlimits_for_v::is_signed ? (mW == -cInf) : false);
850 
851  if (bIsInf) {
852  return mW;
853  }
854  return 10 * log10(mW);
855  }
compose< Wb, pow< m,-2 > > T
Definition: Units.h:781
milli< W >::type mW
Definition: Units.h:903

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