21 #ifndef UAN_TRANSDUCER_H
22 #define UAN_TRANSDUCER_H
24 #include "ns3/object.h"
25 #include "ns3/packet.h"
27 #include "ns3/uan-prop-model.h"
171 virtual bool IsRx (
void)
const = 0;
177 virtual bool IsTx (
void)
const = 0;
A base class which provides memory management and object aggregation.
Simulation virtual time values and global simulation resolution.
a unique identifier for an interface.
Class consisting of packet arrival information (Time, RxPower, mode, PDP).
Time GetArrivalTime(void) const
Get the packet arrival time.
Ptr< Packet > m_packet
The arrived packet.
UanPdp m_pdp
The propagation delay profile.
double GetRxPowerDb(void) const
Get the received signal strength.
const UanTxMode & GetTxMode(void) const
Get the transmission mode of the packet.
Ptr< Packet > GetPacket(void) const
Get the arriving packet.
double m_rxPowerDb
The received power, in dB.
UanPacketArrival(Ptr< Packet > packet, double rxPowerDb, UanTxMode txMode, UanPdp pdp, Time arrTime)
Constructor.
~UanPacketArrival()
Destructor.
Time m_arrTime
The arrival time.
UanTxMode m_txMode
The transmission mode.
UanPacketArrival()
Default constructor.
UanPdp GetPdp(void) const
Get the propagation delay profile.
The power delay profile returned by propagation models.
Virtual base for Transducer objects.
virtual bool IsTx(void) const =0
Is the state transmitting?
virtual double GetRxGainDb(void)=0
Get the receiver gain added to signal at receiver in dB.
virtual bool IsRx(void) const =0
Is the state receiving (or available for reception)?
virtual const UanPhyList & GetPhyList(void) const =0
Get the list of physical layer above this transducer.
virtual void AddPhy(Ptr< UanPhy > phy)=0
Attach a physical network layer above this transducer.
virtual double ApplyRxGainDb(double rxPowerDb, UanTxMode mode)=0
Apply receiver gain in dB to the received power.
std::list< Ptr< UanPhy > > UanPhyList
List of UanPhy objects.
static TypeId GetTypeId(void)
Register this type.
virtual State GetState(void) const =0
Get the transducer state.
std::list< UanPacketArrival > ArrivalList
List of arriving packets overlapping in time.
virtual void Receive(Ptr< Packet > packet, double rxPowerDb, UanTxMode txMode, UanPdp pdp)=0
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 const ArrivalList & GetArrivalList(void) const =0
Get the list of overlapped (in time) packets at this transducer.
virtual void SetChannel(Ptr< UanChannel > chan)=0
Attach this transducer to a channel.
virtual Ptr< UanChannel > GetChannel(void) const =0
Get the attached channel.
virtual void SetRxGainDb(double gainDb)=0
Set the receiver gain.
virtual void Clear(void)=0
Clears all pointer references.
Abstraction of packet modulation information.
Every class exported by the ns3 library is enclosed in the ns3 namespace.