24 #include "ns3/uan-mac.h"
25 #include "ns3/nstime.h"
26 #include "ns3/simulator.h"
27 #include "ns3/uan-phy.h"
28 #include "ns3/uan-tx-mode.h"
29 #include "ns3/uan-address.h"
30 #include "ns3/random-variable-stream.h"
49 static TypeId GetTypeId (
void);
54 virtual void SetCw (uint32_t cw);
62 virtual uint32_t
GetCw (
void);
75 virtual void Clear (
void);
103 IDLE, CCABUSY, RUNNING, TX
121 uint16_t m_pktTxProt;
132 void PhyRxPacketError (
Ptr<Packet> packet,
double sinr);
133 void SaveTimer (
void);
134 void StartTimer (
void);
135 void SendPacket (
void);
CW-MAC A MAC protocol similar in idea to the 802.11 DCF with constant backoff window.
virtual Address GetAddress()
forward calls to a chain of CallbackAn ns3::TracedCallback has almost exactly the same API as a norma...
virtual void SetSlotTime(Time duration)
virtual void AttachPhy(Ptr< UanPhy > phy)
virtual Address GetBroadcast(void) const
virtual void NotifyRxEndError(void)
Function called by UanPhy object to notify of packet received in error.
a polymophic address class
virtual void SetAddress(UanAddress addr)
virtual bool Enqueue(Ptr< Packet > pkt, const Address &dest, uint16_t protocolNumber)
Virtual base class for all UAN MAC protocols.
virtual void SetCw(uint32_t cw)
virtual void NotifyRxStart(void)
Function called by UanPhy object to notify of packet reception.
Abstraction of packet modulation information.
Ptr< UniformRandomVariable > m_rv
Provides uniform random variables.
virtual void NotifyRxEndOk(void)
Function called by UanPhy object to notify of packet received successfully.
virtual void NotifyCcaStart(void)
Function called by UanPhy object to notify of channel sensed busy.
Interface for PHY event listener A class which implements this interface may register with Phy object...
virtual Time GetSlotTime(void)
virtual void NotifyTxStart(Time duration)
Function called by UanPhy object to notify of outgoing transmission start.
virtual uint32_t GetCw(void)
an identifier for simulation events.
int64_t AssignStreams(int64_t stream)
virtual void SetForwardUpCb(Callback< void, Ptr< Packet >, const UanAddress & > cb)
a unique identifier for an interface.
virtual void NotifyCcaEnd(void)
Function called by UanPhy object to notify of channel no longer sensed busy.