A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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:

Public Types

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

Public Member Functions

 UanChannel ()
 Constructor. More...
 
virtual ~UanChannel ()
 Dummy destructor, see DoDispose. More...
 
void AddDevice (Ptr< UanNetDevice > dev, Ptr< UanTransducer > trans)
 Adds device to receiver list for this channel. More...
 
void Clear (void)
 Clear all pointer references. More...
 
virtual Ptr< NetDeviceGetDevice (uint32_t i) const
 
virtual uint32_t GetNDevices (void) const
 
double GetNoiseDbHz (double fKhz)
 Get the noise level on the channel. More...
 
void SetNoiseModel (Ptr< UanNoiseModel > noise)
 Set the noise model this channel will use to determine ambient channel noise. More...
 
void SetPropagationModel (Ptr< UanPropModel > prop)
 Set the propagation model this channel will use for path loss/propagation delay. More...
 
void TxPacket (Ptr< UanTransducer > src, Ptr< Packet > packet, double txPowerDb, UanTxMode txmode)
 Send a packet out on the channel. More...
 
- Public Member Functions inherited from ns3::Channel
 Channel ()
 
virtual ~Channel ()
 
uint32_t GetId (void) const
 
- Public Member Functions inherited from ns3::Object
 Object ()
 
virtual ~Object ()
 
void AggregateObject (Ptr< Object > other)
 
void Dispose (void)
 Run the DoDispose methods of this object and all the objects aggregated to it. More...
 
AggregateIterator GetAggregateIterator (void) const
 
virtual TypeId GetInstanceTypeId (void) const
 
template<typename T >
Ptr< T > GetObject (void) const
 
template<typename T >
Ptr< T > GetObject (TypeId tid) const
 
void Initialize (void)
 This method calls the virtual DoInitialize method on all the objects aggregated to this object. More...
 
- Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
 SimpleRefCount ()
 Constructor. More...
 
 SimpleRefCount (const SimpleRefCount &o)
 Copy constructor. More...
 
uint32_t GetReferenceCount (void) const
 Get the reference count of the object. More...
 
SimpleRefCountoperator= (const SimpleRefCount &o)
 Assignment. More...
 
void Ref (void) const
 Increment the reference count. More...
 
void Unref (void) const
 Decrement the reference count. More...
 
- Public Member Functions inherited from ns3::ObjectBase
virtual ~ObjectBase ()
 Virtual destructor. More...
 
void GetAttribute (std::string name, AttributeValue &value) const
 
bool GetAttributeFailSafe (std::string name, AttributeValue &attribute) const
 
void SetAttribute (std::string name, const AttributeValue &value)
 
bool SetAttributeFailSafe (std::string name, const AttributeValue &value)
 
bool TraceConnect (std::string name, std::string context, const CallbackBase &cb)
 
bool TraceConnectWithoutContext (std::string name, const CallbackBase &cb)
 
bool TraceDisconnect (std::string name, std::string context, const CallbackBase &cb)
 
bool TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb)
 

Static Public Member Functions

static TypeId GetTypeId (void)
 Register this type. More...
 
- Static Public Member Functions inherited from ns3::Channel
static TypeId GetTypeId (void)
 Get the type ID. More...
 
- Static Public Member Functions inherited from ns3::Object
static TypeId GetTypeId (void)
 Register this type. More...
 
- Static Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
static void Cleanup (void)
 Noop. More...
 
- Static Public Member Functions inherited from ns3::ObjectBase
static TypeId GetTypeId (void)
 Get the type ID. More...
 

Protected Member Functions

virtual void DoDispose (void)
 This method is called by Object::Dispose or by the object's destructor, whichever comes first. More...
 
- Protected Member Functions inherited from ns3::Object
 Object (const Object &o)
 
virtual void DoInitialize (void)
 This method is called only once by Object::Initialize. More...
 
virtual void NotifyNewAggregate (void)
 This method is invoked whenever two sets of objects are aggregated together. More...
 
- Protected Member Functions inherited from ns3::ObjectBase
void ConstructSelf (const AttributeConstructionList &attributes)
 
virtual void NotifyConstructionCompleted (void)
 This method is invoked once all member attributes have been initialized. More...
 

Private Member Functions

void SendUp (uint32_t i, Ptr< Packet > packet, double rxPowerDb, UanTxMode txMode, UanPdp pdp)
 Send a packet up to the receiving UanTransducer. More...
 

Private Attributes

bool m_cleared
 Has Clear ever been called on the channel. More...
 
UanDeviceList m_devList
 The list of devices on this channel. More...
 
Ptr< UanNoiseModelm_noise
 The noise model. More...
 
Ptr< UanPropModelm_prop
 The propagation model. More...
 

Detailed Description

Channel class used by UAN devices.

Config Paths

ns3::UanChannel is accessible through the following paths with Config::Set and Config::Connect:

  • /ChannelList/[i]/$ns3::UanChannel
  • /NodeList/[i]/DeviceList/[i]/$ns3::UanNetDevice/Channel

Attributes

Attributes defined in parent class ns3::Channel

No TraceSources are defined for this type.

Definition at line 45 of file uan-channel.h.

Member Typedef Documentation

typedef std::vector<std::pair<Ptr<UanNetDevice>, Ptr<UanTransducer> > > ns3::UanChannel::UanDeviceList

UanDeviceList is a standard template vector of pairs (UanNetDevice, UanTransducer)

Definition at line 52 of file uan-channel.h.

Constructor & Destructor Documentation

ns3::UanChannel::UanChannel ( )

Constructor.

Definition at line 66 of file uan-channel.cc.

ns3::UanChannel::~UanChannel ( )
virtual

Dummy destructor, see DoDispose.

Definition at line 73 of file uan-channel.cc.

Member Function Documentation

void ns3::UanChannel::AddDevice ( Ptr< UanNetDevice dev,
Ptr< UanTransducer trans 
)

Adds device to receiver list for this channel.

Parameters
devNet Device of node.
transTransducer of net device attached to this channel.

Definition at line 139 of file uan-channel.cc.

References m_devList, and NS_LOG_DEBUG.

void ns3::UanChannel::Clear ( void  )

Clear all pointer references.

Definition at line 78 of file uan-channel.cc.

References m_cleared, m_devList, m_noise, and m_prop.

Referenced by DoDispose().

+ Here is the caller graph for this function:

void ns3::UanChannel::DoDispose ( void  )
protectedvirtual

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.

Definition at line 114 of file uan-channel.cc.

References Clear(), and ns3::Object::DoDispose().

+ Here is the call graph for this function:

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.

Definition at line 133 of file uan-channel.cc.

References m_devList.

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.

Definition at line 127 of file uan-channel.cc.

References m_devList.

double ns3::UanChannel::GetNoiseDbHz ( double  fKhz)

Get the noise level on the channel.

Parameters
fKhzFrequency in kHz.
Returns
Ambient noise in dB/Hz on channel at a frequency.

Definition at line 212 of file uan-channel.cc.

References m_noise, and NS_ASSERT.

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

Register this type.

Returns
The object TypeId.

Definition at line 46 of file uan-channel.cc.

References m_noise, m_prop, and ns3::TypeId::SetParent().

+ Here is the call graph for this function:

void ns3::UanChannel::SendUp ( uint32_t  i,
Ptr< Packet packet,
double  rxPowerDb,
UanTxMode  txMode,
UanPdp  pdp 
)
private

Send a packet up to the receiving UanTransducer.

Parameters
iDevice number.
packetThe received packet.
rxPowerDbSignal power in dB of arriving packet.
txModeMode arriving packet is using.
pdpPDP of arriving signal.

Definition at line 204 of file uan-channel.cc.

References m_devList, and NS_LOG_DEBUG.

Referenced by TxPacket().

+ Here is the caller graph for this function:

void ns3::UanChannel::SetNoiseModel ( Ptr< UanNoiseModel noise)

Set the noise model this channel will use to determine ambient channel noise.

Parameters
noiseThe noise model.

Definition at line 198 of file uan-channel.cc.

References m_noise, and NS_ASSERT.

void ns3::UanChannel::SetPropagationModel ( Ptr< UanPropModel prop)

Set the propagation model this channel will use for path loss/propagation delay.

Parameters
propThe propagation model.

Definition at line 120 of file uan-channel.cc.

References m_prop, and NS_LOG_DEBUG.

void ns3::UanChannel::TxPacket ( Ptr< UanTransducer src,
Ptr< Packet packet,
double  txPowerDb,
UanTxMode  txmode 
)

Send a packet out on the channel.

Parameters
srcTransducer transmitting packet.
packetPacket to be transmitted.
txPowerDbTransmission power in dB.
txmodeUanTxMode defining modulation of transmitted packet.

Definition at line 146 of file uan-channel.cc.

References ns3::Packet::Copy(), ns3::MobilityModel::GetDistanceFrom(), ns3::Object::GetObject(), m_devList, m_prop, NS_ASSERT, NS_LOG_DEBUG, ns3::Simulator::ScheduleWithContext(), and SendUp().

+ Here is the call graph for this function:

Member Data Documentation

bool ns3::UanChannel::m_cleared
private

Has Clear ever been called on the channel.

Definition at line 119 of file uan-channel.h.

Referenced by Clear().

UanDeviceList ns3::UanChannel::m_devList
private

The list of devices on this channel.

Definition at line 115 of file uan-channel.h.

Referenced by AddDevice(), Clear(), GetDevice(), GetNDevices(), SendUp(), and TxPacket().

Ptr<UanNoiseModel> ns3::UanChannel::m_noise
private

The noise model.

Definition at line 117 of file uan-channel.h.

Referenced by Clear(), GetNoiseDbHz(), GetTypeId(), and SetNoiseModel().

Ptr<UanPropModel> ns3::UanChannel::m_prop
private

The propagation model.

Definition at line 116 of file uan-channel.h.

Referenced by Clear(), GetTypeId(), SetPropagationModel(), and TxPacket().


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