utility.hpp File Reference

This includes some typedef's, functions, and constants that are used globally. More...

#include <iostream>
#include <math.h>
#include <boost/shared_ptr.hpp>

Go to the source code of this file.

Typedefs

typedef unsigned int t_uint
 Shorten the name for unsigned primitives.
typedef unsigned long t_ulong
 Shorten the name for unsigned primitives.
typedef unsigned char t_uchar
 Shorten the name for unsigned primitives.
typedef boost::shared_ptr<
ostream > 
ostreamPtr
 Smart pointer that clients should use.

Functions

double powerToDecibels (double powerValue)
 Convert a power value to decibels (dB).
double decibelsToPower (double decibelValue)
 Convert a decibel (dB) value to a power value.

Variables

const double SPEED_OF_LIGHT = 299792458.0
 Speed of light constant in meters per seconds (m/s).
const double PI = 3.14159265
 The constant for PI.


Detailed Description

This includes some typedef's, functions, and constants that are used globally.

Definition in file utility.hpp.


Function Documentation

double decibelsToPower ( double  decibelValue  )  [inline]

Convert a decibel (dB) value to a power value.

The denominator of the ratio is 1.0.

Parameters:
decibelValue the value in dB.
Returns:
the dB value converted to its original power value.

Definition at line 46 of file utility.hpp.

Referenced by TwoRay::getRecvdStrength(), and FreeSpace::getRecvdStrength().

double powerToDecibels ( double  powerValue  )  [inline]

Convert a power value to decibels (dB).

The denominator of the ratio is 1.0.

Parameters:
powerValue the original power value.
Returns:
the power value converted to dB.

Definition at line 34 of file utility.hpp.

Referenced by PhysicalLayer::recvFromLayer().


Generated on Tue Dec 12 17:04:39 2006 for rfidsim by  doxygen 1.4.7