Channel class used by UAN devices. More...
#include <uan-channel.h>
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 () | |
virtual | ~UanChannel () |
void | AddDevice (Ptr< UanNetDevice > dev, Ptr< UanTransducer > trans) |
void | Clear (void) |
virtual Ptr< NetDevice > | GetDevice (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) |
![]() | |
Channel () | |
virtual | ~Channel () |
uint32_t | GetId (void) const |
![]() | |
Object () | |
virtual | ~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) |
![]() | |
SimpleRefCount () | |
SimpleRefCount (const SimpleRefCount &o) | |
uint32_t | GetReferenceCount (void) const |
SimpleRefCount & | operator= (const SimpleRefCount &o) |
void | Ref (void) const |
void | Unref (void) const |
![]() | |
virtual | ~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 TypeId | GetTypeId (void) |
![]() | |
static TypeId | GetTypeId (void) |
![]() | |
static void | Cleanup (void) |
![]() | |
static TypeId | GetTypeId (void) |
Protected Member Functions | |
virtual void | DoDispose () |
![]() | |
Object (const Object &o) | |
virtual void | DoInitialize (void) |
virtual void | NotifyNewAggregate (void) |
![]() | |
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< UanNoiseModel > | m_noise |
Ptr< UanPropModel > | m_prop |
Channel class used by UAN devices.
ns3::UanChannel is accessible through the following paths with Config::Set and Config::Connect:
No TraceSources are defined for this type.
Definition at line 44 of file uan-channel.h.
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 50 of file uan-channel.h.
ns3::UanChannel::UanChannel | ( | ) |
Definition at line 66 of file uan-channel.cc.
|
virtual |
Definition at line 73 of file uan-channel.cc.
void ns3::UanChannel::AddDevice | ( | Ptr< UanNetDevice > | dev, |
Ptr< UanTransducer > | trans | ||
) |
dev | Net Device of node |
trans | Transducer 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 m_devList, and NS_LOG_DEBUG.
void ns3::UanChannel::Clear | ( | void | ) |
Clears 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().
|
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().
i | index of NetDevice to retrieve |
This method must be implemented by subclasses.
Implements ns3::Channel.
Definition at line 133 of file uan-channel.cc.
References m_devList.
|
virtual |
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 | ) |
fKhz | Frequency in kHz |
Definition at line 212 of file uan-channel.cc.
|
static |
Definition at line 46 of file uan-channel.cc.
References m_noise, m_prop, and ns3::TypeId::SetParent().
|
private |
Definition at line 204 of file uan-channel.cc.
References m_devList, and NS_LOG_DEBUG.
Referenced by TxPacket().
void ns3::UanChannel::SetNoiseModel | ( | Ptr< UanNoiseModel > | noise | ) |
noise | Noise model this channel will use to determine ambient channel noise. |
Definition at line 198 of file uan-channel.cc.
void ns3::UanChannel::SetPropagationModel | ( | Ptr< UanPropModel > | prop | ) |
prop | Propagation model this channel will use for path loss/propagation delay |
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 | ||
) |
src | Transducer transmitting packet |
packet | Packet to be transmitted |
txPowerDb | Transmission power in dB |
txmode | UanTxMode 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(), m_devList, m_prop, NS_ASSERT, NS_LOG_DEBUG, ns3::Simulator::ScheduleWithContext(), and SendUp().
|
private |
Definition at line 106 of file uan-channel.h.
Referenced by Clear().
|
private |
Definition at line 103 of file uan-channel.h.
Referenced by AddDevice(), Clear(), GetDevice(), GetNDevices(), SendUp(), and TxPacket().
|
private |
Definition at line 105 of file uan-channel.h.
Referenced by Clear(), GetNoiseDbHz(), GetTypeId(), and SetNoiseModel().
|
private |
Definition at line 104 of file uan-channel.h.
Referenced by Clear(), GetTypeId(), SetPropagationModel(), and TxPacket().