A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ns3::UanChannel Class Reference

Channel class used by UAN devices. More...

#include <introspected-doxygen.h>

+ Inheritance 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)
 

Public Member Functions

void AddDevice (Ptr< UanNetDevice > dev, Ptr< UanTransducer > trans)
 
void Clear (void)
 
virtual Ptr< NetDeviceGetDevice (uint32_t i) const
 
virtual uint32_t GetNDevices (void) const
 
double GetNoiseDbHz (double fKhz)
 
void SetNoiseModel (Ptr< UanNoiseModel > noise)
 
void SetPropagationModel (Ptr< UanPropModel > prop)
 
void TxPacket (Ptr< UanTransducer > src, Ptr< Packet > packet, double txPowerDb, UanTxMode txmode)
 
- Public Member Functions inherited from ns3::Channel
uint32_t GetId (void) const
 
- Public Member Functions inherited from ns3::Object
void AggregateObject (Ptr< Object > other)
 
void Dispose (void)
 
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)
 
- Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
 SimpleRefCount (const SimpleRefCount &o)
 
uint32_t GetReferenceCount (void) const
 
SimpleRefCountoperator= (const SimpleRefCount &o)
 
void Ref (void) const
 
void Unref (void) const
 
- Public Member Functions inherited from ns3::ObjectBase
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 ()
 
- Static Public Member Functions inherited from ns3::Channel
static TypeId GetTypeId (void)
 
- Static Public Member Functions inherited from ns3::Object
static TypeId GetTypeId (void)
 
- Static Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
static void Cleanup (void)
 
- Static Public Member Functions inherited from ns3::ObjectBase
static TypeId GetTypeId (void)
 

Protected Member Functions

virtual void DoDispose ()
 
- Protected Member Functions inherited from ns3::Object
 Object (const Object &o)
 
virtual void DoInitialize (void)
 
virtual void NotifyNewAggregate (void)
 
- Protected Member Functions inherited from ns3::ObjectBase
void ConstructSelf (const AttributeConstructionList &attributes)
 
virtual void NotifyConstructionCompleted (void)
 

Private Member Functions

void SendUp (uint32_t i, Ptr< Packet > packet, double rxPowerDb, UanTxMode txMode, UanPdp pdp)
 

Private Attributes

bool m_cleared
 
UanDeviceList m_devList
 
Ptr< UanNoiseModelm_noise
 
Ptr< UanPropModelm_prop
 

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

  • PropagationModel: A pointer to the propagation model.
    • Set with class: ns3::PointerValue
    • Underlying type: ns3::Ptr< ns3::UanPropModel >
    • Initial value: 0x1058e30
    • Flags: construct write read
  • NoiseModel: A pointer to the model of the channel ambient noise.
    • Set with class: ns3::PointerValue
    • Underlying type: ns3::Ptr< ns3::UanNoiseModel >
    • Initial value: 0x1061b10
    • Flags: construct write read

Attributes defined in parent class ns3::Channel

No TraceSources are defined for this type.

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

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

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

References NS_LOG_DEBUG.

void ns3::UanChannel::Clear ( void  )

Clears all pointer references

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

Referenced by DoDispose().

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().

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.

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.

double ns3::UanChannel::GetNoiseDbHz ( double  fKhz)
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 NS_ASSERT.

void ns3::UanChannel::SetNoiseModel ( Ptr< UanNoiseModel noise)
Parameters
noiseNoise model this channel will use to determine ambient channel noise.

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

References NS_ASSERT.

void ns3::UanChannel::SetPropagationModel ( Ptr< UanPropModel prop)
Parameters
propPropagation model this channel will use for path loss/propagation delay

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

References NS_LOG_DEBUG.

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

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

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


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