21 #ifndef UAN_MAC_ALOHA_H
22 #define UAN_MAC_ALOHA_H
25 #include "ns3/mac8-address.h"
61 virtual void Clear (
void);
a polymophic address class
A class used for addressing MAC8 MAC's.
a unique identifier for an interface.
ALOHA MAC Protocol, the simplest MAC protocol for wireless networks.
virtual ~UanMacAloha()
Dummy destructor, see DoDispose.
Ptr< UanPhy > m_phy
PHY layer attached to this MAC.
virtual void SetForwardUpCb(Callback< void, Ptr< Packet >, uint16_t, const Mac8Address & > cb)
Set the callback to forward packets up to higher layers.
bool m_cleared
Flag when we've been cleared.
virtual void Clear(void)
Clears all pointer references.
virtual bool Enqueue(Ptr< Packet > pkt, uint16_t protocolNumber, const Address &dest)
Enqueue packet to be transmitted.
virtual void AttachPhy(Ptr< UanPhy > phy)
Attach PHY layer to this MAC.
UanMacAloha()
Default constructor.
int64_t AssignStreams(int64_t stream)
Assign a fixed random variable stream number to the random variables used by this model.
void RxPacketGood(Ptr< Packet > pkt, double sinr, UanTxMode txMode)
Receive packet from lower layer (passed to PHY as callback).
virtual void DoDispose()
Destructor implementation.
Callback< void, Ptr< Packet >, uint16_t, const Mac8Address & > m_forUpCb
Forwarding up callback.
static TypeId GetTypeId(void)
Register this type.
void RxPacketError(Ptr< Packet > pkt, double sinr)
Packet received at lower layer in error.
Virtual base class for all UAN MAC protocols.
Abstraction of packet modulation information.
Every class exported by the ns3 library is enclosed in the ns3 namespace.