10#define UAN_MAC_ALOHA_H
14#include "ns3/mac8-address.h"
48 void Clear()
override;
a polymophic address class
A class used for addressing MAC8 MAC's.
Smart pointer class similar to boost::intrusive_ptr.
a unique identifier for an interface.
ALOHA MAC Protocol, the simplest MAC protocol for wireless networks.
static TypeId GetTypeId()
Register this type.
Ptr< UanPhy > m_phy
PHY layer attached to this MAC.
void DoDispose() override
Destructor implementation.
bool m_cleared
Flag when we've been cleared.
bool Enqueue(Ptr< Packet > pkt, uint16_t protocolNumber, const Address &dest) override
Enqueue packet to be transmitted.
UanMacAloha()
Default constructor.
void AttachPhy(Ptr< UanPhy > phy) override
Attach PHY layer to this MAC.
void SetForwardUpCb(Callback< void, Ptr< Packet >, uint16_t, const Mac8Address & > cb) override
Set the callback to forward packets up to higher layers.
int64_t AssignStreams(int64_t stream) override
Assign a fixed random variable stream number to the random variables used by this model.
Callback< void, Ptr< Packet >, uint16_t, const Mac8Address & > m_forUpCb
Forwarding up callback.
void RxPacketGood(Ptr< Packet > pkt, double sinr, UanTxMode txMode)
Receive packet from lower layer (passed to PHY as callback).
~UanMacAloha() override
Dummy destructor, see DoDispose.
void RxPacketError(Ptr< Packet > pkt, double sinr)
Packet received at lower layer in error.
void Clear() override
Clears all pointer references.
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.