ns-3
ns3::UanTransducer Class Reference

Virtual base for Transducer objects. More...

#include <uan-transducer.h>

Inheritance diagram for ns3::UanTransducer:
Collaboration diagram for ns3::UanTransducer:

List of all members.

Public Types

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.

Public Member Functions

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

Static Public Member Functions

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

Detailed Description

Virtual base for Transducer objects.

The Transducer was added to support classes such as UanPhyDual. In a generic Phy setting, this class functions to hold information about all possibly interfering packets.


Member Function Documentation

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

Implemented in ns3::UanTransducerHd.

Referenced by ns3::UanPhyGen::SetTransducer().

virtual void ns3::UanTransducer::Clear ( void  ) [pure virtual]

Clears all pointer references

Implemented in ns3::UanTransducerHd.

Referenced by ns3::UanNetDevice::Clear(), and ns3::UanPhyGen::Clear().

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

Implemented in ns3::UanTransducerHd.

Referenced by ns3::UanMacCw::Enqueue().

virtual Ptr<UanChannel> ns3::UanTransducer::GetChannel ( void  ) const [pure virtual]
Returns:
Channel this transducer is attached to

Implemented in ns3::UanTransducerHd.

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

Implemented in ns3::UanTransducerHd.

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

Implemented in ns3::UanTransducerHd.

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

This object is accessible through the following paths with Config::Set and Config::Connect:

  • /NodeList/[i]/DeviceList/[i]/$ns3::AlohaNoackNetDevice/Phy/$ns3::UanNetDevice/Transducer
  • /NodeList/[i]/DeviceList/[i]/$ns3::AlohaNoackNetDevice/Phy/$ns3::UanTransducer
  • /NodeList/[i]/DeviceList/[i]/$ns3::NonCommunicatingNetDevice/Phy/$ns3::UanNetDevice/Transducer
  • /NodeList/[i]/DeviceList/[i]/$ns3::NonCommunicatingNetDevice/Phy/$ns3::UanTransducer
  • /NodeList/[i]/DeviceList/[i]/$ns3::UanNetDevice/Transducer

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

Reimplemented from ns3::Object.

Reimplemented in ns3::UanTransducerHd.

References ns3::TypeId::SetParent().

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

Implemented in ns3::UanTransducerHd.

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

Implemented in ns3::UanTransducerHd.

virtual void ns3::UanTransducer::Receive ( Ptr< Packet packet,
double  rxPowerDb,
UanTxMode  txMode,
UanPdp  pdp 
) [pure 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

Implemented in ns3::UanTransducerHd.

virtual void ns3::UanTransducer::SetChannel ( Ptr< UanChannel chan) [pure virtual]
Parameters:
chanChannel this transducer is attached to

Implemented in ns3::UanTransducerHd.

Referenced by ns3::UanNetDevice::SetChannel(), and ns3::UanNetDevice::SetTransducer().

virtual void ns3::UanTransducer::Transmit ( Ptr< UanPhy src,
Ptr< Packet packet,
double  txPowerDb,
UanTxMode  txMode 
) [pure virtual]

Transmit a packet from this transducer.

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

Implemented in ns3::UanTransducerHd.

Referenced by ns3::UanPhyGen::SendPacket().


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