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

Half duplex implementation of transducer object. More...

#include <introspected-doxygen.h>

+ Inheritance diagram for ns3::UanTransducerHd:

Public Member Functions

virtual void AddPhy (Ptr< UanPhy >)
 
virtual void Clear (void)
 
virtual const ArrivalListGetArrivalList (void) const
 
virtual Ptr< UanChannelGetChannel (void) const
 
virtual const UanPhyListGetPhyList (void) const
 
virtual State GetState (void) const
 
virtual bool IsRx (void) const
 
virtual bool IsTx (void) const
 
virtual void Receive (Ptr< Packet > packet, double rxPowerDb, UanTxMode txMode, UanPdp pdp)
 Receive Notify this object that a new packet has arrived at this nodes location. More...
 
virtual void SetChannel (Ptr< UanChannel > chan)
 
virtual void Transmit (Ptr< UanPhy > src, Ptr< Packet > packet, double txPowerDb, UanTxMode txMode)
 Transmit a packet from this transducer. More...
 
- 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 (void)
 
- Static Public Member Functions inherited from ns3::UanTransducer
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 EndTx (void)
 
void RemoveArrival (UanPacketArrival arrival)
 

Private Attributes

ArrivalList m_arrivalList
 
Ptr< UanChannelm_channel
 
bool m_cleared
 
EventId m_endTxEvent
 
Time m_endTxTime
 
UanPhyList m_phyList
 
State m_state
 

Additional Inherited Members

- Public Types inherited from ns3::UanTransducer
typedef std::list
< UanPacketArrival
ArrivalList
 Arrival list is a standard template library list of UanPacketArrivals objects.
 
enum  State { TX, RX }
 Transducer state (receiving or transmitting)
 
typedef std::list< Ptr< UanPhy > > UanPhyList
 UanPhyList is a standard template library list of UanPhy objects.
 

Detailed Description

Half duplex implementation of transducer object.

Doxygen introspection did not find any typical Config paths.
No Attributes are defined for this type.
No TraceSources are defined for this type.

This class will only allow attached Phy's to receive packets if not in TX mode

Definition at line 34 of file uan-transducer-hd.h.

Member Function Documentation

void ns3::UanTransducerHd::AddPhy ( Ptr< UanPhy phy)
virtual
Parameters
phyAdd phy above this transducer (may connect > 1 Phy to a transducer)

Implements ns3::UanTransducer.

Definition at line 213 of file uan-transducer-hd.cc.

void ns3::UanTransducerHd::Clear ( void  )
virtual

Clears all pointer references

Implements ns3::UanTransducer.

Definition at line 48 of file uan-transducer-hd.cc.

References ns3::EventId::Cancel().

Referenced by DoDispose().

void ns3::UanTransducerHd::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 81 of file uan-transducer-hd.cc.

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

const UanTransducer::ArrivalList & ns3::UanTransducerHd::GetArrivalList ( void  ) const
virtual
Returns
List of all packets currently crossing this node in the water.

Implements ns3::UanTransducer.

Definition at line 117 of file uan-transducer-hd.cc.

Ptr< UanChannel > ns3::UanTransducerHd::GetChannel ( void  ) const
virtual
Returns
Channel this transducer is attached to

Implements ns3::UanTransducer.

Definition at line 208 of file uan-transducer-hd.cc.

const UanTransducer::UanPhyList & ns3::UanTransducerHd::GetPhyList ( void  ) const
virtual
Returns
List of all Phy's this transducer sends packets to.

Implements ns3::UanTransducer.

Definition at line 219 of file uan-transducer-hd.cc.

UanTransducer::State ns3::UanTransducerHd::GetState ( void  ) const
virtual
Returns
State (TX or RX) of this transducer

Implements ns3::UanTransducer.

Definition at line 97 of file uan-transducer-hd.cc.

bool ns3::UanTransducerHd::IsRx ( void  ) const
virtual
Returns
True if this transducer is available for receiving an incoming packet.

Implements ns3::UanTransducer.

Definition at line 104 of file uan-transducer-hd.cc.

bool ns3::UanTransducerHd::IsTx ( void  ) const
virtual
Returns
True if there is a packet being transmitted from this transducer.

Implements ns3::UanTransducer.

Definition at line 110 of file uan-transducer-hd.cc.

void ns3::UanTransducerHd::Receive ( Ptr< Packet packet,
double  rxPowerDb,
UanTxMode  txMode,
UanPdp  pdp 
)
virtual

Receive Notify this object that a new packet has arrived at this nodes location.

Parameters
packetPacket arriving
rxPowerDbSignal power in dB of arriving packet
txModeMode arriving packet is using
pdpPDP of arriving signal

Implements ns3::UanTransducer.

Definition at line 123 of file uan-transducer-hd.cc.

References ns3::UanTxMode::GetDataRateBps(), ns3::Packet::GetSize(), ns3::Simulator::Now(), NS_LOG_DEBUG, ns3::Simulator::Schedule(), and ns3::Seconds().

void ns3::UanTransducerHd::SetChannel ( Ptr< UanChannel chan)
virtual
Parameters
chanChannel this transducer is attached to

Implements ns3::UanTransducer.

Definition at line 201 of file uan-transducer-hd.cc.

References NS_LOG_DEBUG.

void ns3::UanTransducerHd::Transmit ( Ptr< UanPhy src,
Ptr< Packet packet,
double  txPowerDb,
UanTxMode  txMode 
)
virtual

Transmit a packet from this transducer.

Parameters
srcSource PHY
packetPacket to transmit
txPowerDbOutgoing Tx power of packet
txModeMode to transmit packet with.

Implements ns3::UanTransducer.

Definition at line 151 of file uan-transducer-hd.cc.

References ns3::UanTxMode::GetDataRateBps(), ns3::Packet::GetSize(), ns3::UanPhy::NotifyTxEnd(), ns3::Simulator::Now(), NS_LOG_DEBUG, ns3::Simulator::Remove(), ns3::Simulator::Schedule(), and ns3::Seconds().


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