9#ifndef UAN_TRANSDUCER_HD_H
10#define UAN_TRANSDUCER_HD_H
14#include "ns3/simulator.h"
43 bool IsRx()
const override;
44 bool IsTx()
const override;
55 void Clear()
override;
An identifier for simulation events.
Smart pointer class similar to boost::intrusive_ptr.
Simulation virtual time values and global simulation resolution.
a unique identifier for an interface.
Class consisting of packet arrival information (Time, RxPower, mode, PDP).
The power delay profile returned by propagation models.
Half duplex implementation of transducer object.
void EndTx()
Handle end of transmission event.
State GetState() const override
Get the transducer state.
void SetChannel(Ptr< UanChannel > chan) override
Attach this transducer to a channel.
void Clear() override
Clears all pointer references.
bool IsTx() const override
Is the state transmitting?
Ptr< UanChannel > GetChannel() const override
Get the attached channel.
State m_state
Transducer state.
bool m_cleared
Flab when we've been cleared.
static TypeId GetTypeId()
Register this type.
void Transmit(Ptr< UanPhy > src, Ptr< Packet > packet, double txPowerDb, UanTxMode txMode) override
Transmit a packet from this transducer.
double m_rxGainDb
Receive gain in dB.
Ptr< UanChannel > m_channel
The attached channel.
const UanPhyList & GetPhyList() const override
Get the list of physical layer above this transducer.
ArrivalList m_arrivalList
List of arriving packets which overlap in time.
~UanTransducerHd() override
Dummy destructor, see DoDispose.
void RemoveArrival(UanPacketArrival arrival)
Remove an entry from the arrival list.
void SetRxGainDb(double gainDb) override
Set the receiver gain.
bool IsRx() const override
Is the state receiving (or available for reception)?
EventId m_endTxEvent
Event scheduled for end of transmission.
void AddPhy(Ptr< UanPhy >) override
Attach a physical network layer above this transducer.
double GetRxGainDb() override
Get the receiver gain added to signal at receiver in dB.
double ApplyRxGainDb(double rxPowerDb, UanTxMode mode) override
Apply receiver gain in dB to the received power.
UanTransducerHd()
Constructor.
void Receive(Ptr< Packet > packet, double rxPowerDb, UanTxMode txMode, UanPdp pdp) override
Notify this object that a new packet has arrived at this nodes location.
Time m_endTxTime
Time at which transmission will be completed.
void DoDispose() override
Destructor implementation.
const ArrivalList & GetArrivalList() const override
Get the list of overlapped (in time) packets at this transducer.
UanPhyList m_phyList
List of physical layers attached above this tranducer.
Virtual base for Transducer objects.
std::list< Ptr< UanPhy > > UanPhyList
List of UanPhy objects.
std::list< UanPacketArrival > ArrivalList
List of arriving packets overlapping in time.
Abstraction of packet modulation information.
Every class exported by the ns3 library is enclosed in the ns3 namespace.