ns-3
ns3::UanChannel Class Reference

Channel class used by UAN devices. More...

#include <uan-channel.h>

Inheritance diagram for ns3::UanChannel:
Collaboration diagram for ns3::UanChannel:

List of all members.

Public Types

typedef std::vector< std::pair
< Ptr< UanNetDevice >, Ptr
< UanTransducer > > > 
UanDeviceList
 UanDeviceList is a standard template vector of pairs (UanNetDevice, UanTransducer)

Public Member Functions

virtual uint32_t GetNDevices (void) const
virtual Ptr< NetDeviceGetDevice (uint32_t i) const
void TxPacket (Ptr< UanTransducer > src, Ptr< Packet > packet, double txPowerDb, UanTxMode txmode)
void AddDevice (Ptr< UanNetDevice > dev, Ptr< UanTransducer > trans)
void SetPropagationModel (Ptr< UanPropModel > prop)
void SetNoiseModel (Ptr< UanNoiseModel > noise)
double GetNoiseDbHz (double fKhz)
void Clear (void)

Static Public Member Functions

static TypeId GetTypeId ()
 This method returns the TypeId associated to ns3::UanChannel.

Protected Member Functions

virtual void DoDispose ()

Detailed Description

Channel class used by UAN devices.


Member Function Documentation

void ns3::UanChannel::AddDevice ( Ptr< UanNetDevice dev,
Ptr< UanTransducer trans 
)
Parameters:
devNet Device of node
transTransducer of net device attached to this channel

Adds device to receiver list for this channel

References NS_LOG_DEBUG.

Referenced by ns3::UanNetDevice::SetChannel(), and ns3::UanNetDevice::SetTransducer().

void ns3::UanChannel::DoDispose ( void  ) [protected, virtual]

This method is called by Object::Dispose or by the object's destructor, whichever comes first.

Subclasses are expected to implement their real destruction code in an overriden version of this method and chain up to their parent's implementation once they are done. i.e., for simplicity, the destructor of every subclass should be empty and its content should be moved to the associated DoDispose method.

It is safe to call GetObject from within this method.

Reimplemented from ns3::Object.

References Clear().

Ptr< NetDevice > ns3::UanChannel::GetDevice ( uint32_t  i) const [virtual]
Parameters:
iindex of NetDevice to retrieve
Returns:
one of the NetDevices connected to this channel.

This method must be implemented by subclasses.

Implements ns3::Channel.

uint32_t ns3::UanChannel::GetNDevices ( void  ) const [virtual]
Returns:
the number of NetDevices connected to this Channel.

This method must be implemented by subclasses.

Implements ns3::Channel.

double ns3::UanChannel::GetNoiseDbHz ( double  fKhz)
Parameters:
fKhzFrequency in kHz
Returns:
Ambient noise in dB/Hz on channel at a frequency

References ns3::UanNoiseModel::GetNoiseDbHz(), and NS_ASSERT.

TypeId ns3::UanChannel::GetTypeId ( void  ) [static]

This method returns the TypeId associated to ns3::UanChannel.

This object is accessible through the following paths with Config::Set and Config::Connect:

  • /NodeList/[i]/DeviceList/[i]/$ns3::AlohaNoackNetDevice/Phy/$ns3::Channel/$ns3::UanChannel
  • /NodeList/[i]/DeviceList/[i]/$ns3::AlohaNoackNetDevice/Phy/$ns3::ChannelListPriv/ChannelList/[i]/$ns3::UanChannel
  • /NodeList/[i]/DeviceList/[i]/$ns3::AlohaNoackNetDevice/Phy/$ns3::UanChannel
  • /NodeList/[i]/DeviceList/[i]/$ns3::AlohaNoackNetDevice/Phy/$ns3::UanNetDevice/Channel
  • /NodeList/[i]/DeviceList/[i]/$ns3::NonCommunicatingNetDevice/Phy/$ns3::Channel/$ns3::UanChannel
  • /NodeList/[i]/DeviceList/[i]/$ns3::NonCommunicatingNetDevice/Phy/$ns3::ChannelListPriv/ChannelList/[i]/$ns3::UanChannel
  • /NodeList/[i]/DeviceList/[i]/$ns3::NonCommunicatingNetDevice/Phy/$ns3::UanChannel
  • /NodeList/[i]/DeviceList/[i]/$ns3::NonCommunicatingNetDevice/Phy/$ns3::UanNetDevice/Channel
  • /NodeList/[i]/DeviceList/[i]/$ns3::UanNetDevice/Channel

Attributes defined for this type:

Attributes defined in parent class ns3::Channel:

No TraceSources defined for this type.

Reimplemented from ns3::Channel.

References ns3::TypeId::SetParent().

Parameters:
noiseNoise model this channel will use to determine ambient channel noise.

References NS_ASSERT.

Referenced by ns3::UanHelper::Install().

Parameters:
propPropagation model this channel will use for path loss/propagation delay

References NS_LOG_DEBUG.

Referenced by ns3::UanHelper::Install().

void ns3::UanChannel::TxPacket ( Ptr< UanTransducer src,
Ptr< Packet packet,
double  txPowerDb,
UanTxMode  txmode 
)
Parameters:
srcTransducer transmitting packet
packetPacket to be transmitted
txPowerDbTransmission power in dB
txmodeUanTxMode defining modulation of transmitted packet Send a packet out on the channel

References ns3::Packet::Copy(), ns3::UanPropModel::GetDelay(), ns3::MobilityModel::GetDistanceFrom(), ns3::Object::GetObject(), ns3::UanPropModel::GetPathLossDb(), ns3::UanPropModel::GetPdp(), NS_ASSERT, NS_LOG_DEBUG, and ns3::Simulator::ScheduleWithContext().

Referenced by ns3::UanTransducerHd::Transmit().


The documentation for this class was generated from the following files: