ns-3
ns3::UanTransducerHd Class Reference

Half duplex implementation of transducer object. More...

#include <uan-transducer-hd.h>

Inheritance diagram for ns3::UanTransducerHd:
Collaboration diagram for ns3::UanTransducerHd:

List of all members.

Public Member Functions

virtual State GetState (void) const
virtual bool IsRx (void) const
virtual bool IsTx (void) const
virtual const ArrivalListGetArrivalList (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.
virtual void Transmit (Ptr< UanPhy > src, Ptr< Packet > packet, double txPowerDb, UanTxMode txMode)
 Transmit a packet from this transducer.
virtual void SetChannel (Ptr< UanChannel > chan)
virtual Ptr< UanChannelGetChannel (void) const
virtual void AddPhy (Ptr< UanPhy >)
virtual const UanPhyListGetPhyList (void) const
virtual void Clear (void)

Static Public Member Functions

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

Protected Member Functions

virtual void DoDispose ()

Additional Inherited Members

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

Detailed Description

Half duplex implementation of transducer object.

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


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.

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

Clears all pointer references

Implements ns3::UanTransducer.

References ns3::EventId::Cancel(), and ns3::UanChannel::Clear().

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.

References Clear().

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

Implements ns3::UanTransducer.

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

Implements ns3::UanTransducer.

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

Implements ns3::UanTransducer.

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

Implements ns3::UanTransducer.

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

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

No Attributes defined for this type.
No TraceSources defined for this type.

Reimplemented from ns3::UanTransducer.

References ns3::TypeId::SetParent().

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

Implements ns3::UanTransducer.

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

Implements ns3::UanTransducer.

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.

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.

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.

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


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