WirelessCommSignal Class Reference

A radio signal to transmitted over a WirelessChannel. More...

#include <wireless_comm_signal.hpp>

Inheritance diagram for WirelessCommSignal:

Signal List of all members.

Public Types

typedef boost::shared_ptr<
WirelessCommSignal
WirelessCommSignalPtr
 Smart pointer that clients should use.

Public Member Functions

PacketPtr getPacketPtr () const
 Get the packet encapsulated in this signal.
double getWavelength () const
 Get the wavelength of this signal.
double getTransmitterGain () const
 Get the gain of the transmitter of the signal.
SimTime getDuration () const
 Get the time duration of the signal.
void setChannelId (t_uint channelId)
 Set the channel ID of the signal.
t_uint getChannelId () const
 Get the channel ID of the signal.

Static Public Member Functions

static WirelessCommSignalPtr create (const Location &location, double dbStrength, double wavelength, double transmitterGain, PacketPtr packet)
 A factory method to ensure that all objects are created via new since we are using smart pointers.
static WirelessCommSignalPtr create (const WirelessCommSignal &rhs)
 A factory method to ensure that all objects are created via new since we are using smart pointers.

Protected Member Functions

 WirelessCommSignal (const Location &location, double dbStrength, double wavelength, double transmitterGain, PacketPtr packet)
 A constructor.
 WirelessCommSignal (const WirelessCommSignal &rhs)
 A copy constructor.
virtual SignalPtr clone () const
 Returns a pointer to a deep copy of this object.

Friends

ostream & operator<< (ostream &s, const WirelessCommSignal &rhs)

Detailed Description

A radio signal to transmitted over a WirelessChannel.

Definition at line 15 of file wireless_comm_signal.hpp.


Member Function Documentation

SignalPtr WirelessCommSignal::clone (  )  const [protected, virtual]

Returns a pointer to a deep copy of this object.

This is addresses the slicing problem with copy construction.

Returns:
a pointer to a deep copy of this object.

Reimplemented from Signal.

Definition at line 25 of file wireless_comm_signal.cpp.

References WirelessCommSignal().

Referenced by create().

t_uint WirelessCommSignal::getChannelId (  )  const [inline]

Get the channel ID of the signal.

Returns:
the channel ID.

Definition at line 158 of file wireless_comm_signal.hpp.

SimTime WirelessCommSignal::getDuration (  )  const

Get the time duration of the signal.

Returns:
the time duration of the signal.

Definition at line 31 of file wireless_comm_signal.cpp.

References getPacketPtr().

PacketPtr WirelessCommSignal::getPacketPtr (  )  const [inline]

Get the packet encapsulated in this signal.

Returns:
pointer to the packet.

Definition at line 138 of file wireless_comm_signal.hpp.

Referenced by getDuration().

double WirelessCommSignal::getTransmitterGain (  )  const [inline]

Get the gain of the transmitter of the signal.

Returns:
the gain of the signal's transmitter (unit-less).

Definition at line 148 of file wireless_comm_signal.hpp.

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

double WirelessCommSignal::getWavelength (  )  const [inline]

Get the wavelength of this signal.

Returns:
the wavelength of the signal in meters.

Definition at line 143 of file wireless_comm_signal.hpp.

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

void WirelessCommSignal::setChannelId ( t_uint  channelId  )  [inline]

Set the channel ID of the signal.

Parameters:
channelId the channel ID.

Definition at line 153 of file wireless_comm_signal.hpp.


The documentation for this class was generated from the following files:
Generated on Tue Dec 12 17:04:42 2006 for rfidsim by  doxygen 1.4.7