#include <wireless_channel.hpp>
Inheritance diagram for WirelessChannel:
Public Types | |
typedef boost::shared_ptr< WirelessChannel > | WirelessChannelPtr |
Smart pointer that clients should use. | |
Public Member Functions | |
virtual double | getRecvdStrength (const WirelessCommSignal &signal, const PhysicalLayer &receiver) const |
Compute the signal strength at the receiver for the given signal. | |
virtual bool | signalHasError (double signalSinr, const WirelessCommSignal &signal) const |
Computes whether or not the signal has an error each time it is called based on some channel error model. | |
Static Public Member Functions | |
static WirelessChannelPtr | create (PathLossPtr pathLossModel) |
A factory method to ensure that all objects are created via new since we are using smart pointers. | |
static WirelessChannelPtr | create (PathLossPtr pathLossModel, FadingPtr fadingModel) |
A factory method to ensure that all objects are created via new since we are using smart pointers. | |
Protected Member Functions | |
WirelessChannel (PathLossPtr pathLossModel) | |
A constructor. | |
WirelessChannel (PathLossPtr pathLossModel, FadingPtr fadingModel) | |
A constructor. |
Definition at line 20 of file wireless_channel.hpp.
WirelessChannel::WirelessChannel | ( | PathLossPtr | pathLossModel | ) | [protected] |
A constructor.
pathLossModel | the path loss model that the channel will use. |
Definition at line 9 of file wireless_channel.cpp.
Referenced by create().
WirelessChannel::WirelessChannel | ( | PathLossPtr | pathLossModel, | |
FadingPtr | fadingModel | |||
) | [protected] |
A constructor.
pathLossModel | the path loss model that the channel will use. | |
fadingModel | the fading model that the channel will use. |
Definition at line 15 of file wireless_channel.cpp.
WirelessChannelPtr WirelessChannel::create | ( | PathLossPtr | pathLossModel, | |
FadingPtr | fadingModel | |||
) | [inline, static] |
A factory method to ensure that all objects are created via new
since we are using smart pointers.
pathLossModel | the path loss model that the channel will use. | |
fadingModel | the fading model that the channel will use. |
Definition at line 108 of file wireless_channel.hpp.
References WirelessChannel().
WirelessChannelPtr WirelessChannel::create | ( | PathLossPtr | pathLossModel | ) | [inline, static] |
A factory method to ensure that all objects are created via new
since we are using smart pointers.
pathLossModel | the path loss model that the channel will use. |
Definition at line 101 of file wireless_channel.hpp.
References WirelessChannel().
double WirelessChannel::getRecvdStrength | ( | const WirelessCommSignal & | signal, | |
const PhysicalLayer & | receiver | |||
) | const [virtual] |
Compute the signal strength at the receiver for the given signal.
signal | the signal being transmitted. | |
receiver | the physical layer object for which we will compute the received signal strength. |
Definition at line 24 of file wireless_channel.cpp.
References CommunicationLayer::getNodeId(), LogStreamManager::instance(), and LogStreamManager::logDebugItem().
bool WirelessChannel::signalHasError | ( | double | signalSinr, | |
const WirelessCommSignal & | signal | |||
) | const [virtual] |
Computes whether or not the signal has an error each time it is called based on some channel error model.
In general, a signal's error rate is based on its SINR, length, and data rate. The SINR is given as a parameter and the other two factors are included in the signal's packet.
signalSinr | the current SINR of the signal. | |
signal | the signal being tested, which includes the length and data rate of the signal's packet. |
Definition at line 50 of file wireless_channel.cpp.