84 if (!
m_phy->IsStateTx ())
uint32_t RemoveHeader(Header &header)
Deserialize and remove the header from the internal buffer.
Ptr< UanPhy > m_phy
PHY layer attached to this MAC.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_UNUSED(x)
Mark a local variable as unused.
static Mac8Address GetBroadcast(void)
Get the broadcast address (255).
virtual void DoDispose(void)
Destructor implementation.
a polymophic address class
virtual bool Enqueue(Ptr< Packet > pkt, uint16_t protocolNumber, const Address &dest)
Enqueue packet to be transmitted.
Virtual base class for all UAN MAC protocols.
virtual Address GetAddress(void)
Get the MAC Address.
void RxPacketGood(Ptr< Packet > pkt, double sinr, UanTxMode txMode)
Receive packet from lower layer (passed to PHY as callback).
Abstraction of packet modulation information.
A class used for addressing MAC8 MAC's.
Callback< void, Ptr< Packet >, uint16_t, const Mac8Address &> m_forUpCb
Forwarding up callback.
static TypeId GetTypeId(void)
Register this type.
Callback< R > MakeCallback(R(T::*memPtr)(void), OBJ objPtr)
void RxPacketError(Ptr< Packet > pkt, double sinr)
Packet received at lower layer in error.
virtual ~UanMacAloha()
Dummy destructor, see DoDispose.
ALOHA MAC Protocol, the simplest MAC protocol for wireless networks.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
virtual void Clear(void)
Clears all pointer references.
static Time Now(void)
Return the current simulation virtual time.
bool m_cleared
Flag when we've been cleared.
virtual void AttachPhy(Ptr< UanPhy > phy)
Attach PHY layer to this MAC.
UanMacAloha()
Default constructor.
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
uint32_t GetTxModeIndex()
virtual void DoDispose()
Destructor implementation.
virtual void SetForwardUpCb(Callback< void, Ptr< Packet >, uint16_t, const Mac8Address &> cb)
Set the callback to forward packets up to higher layers.
int64_t AssignStreams(int64_t stream)
Assign a fixed random variable stream number to the random variables used by this model...
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
static Mac8Address ConvertFrom(const Address &address)
Convert a generic address to a Mac8Address.
void AddHeader(const Header &header)
Add header to this packet.