75 .AddConstructor<UanMacAloha> ()
96 if (!
m_phy->IsStateTx ())
107 m_phy->SendPacket (packet, protocolNumber);
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)
virtual void SetAddress(UanAddress addr)
Set the address.
NS_OBJECT_ENSURE_REGISTERED(NullMessageSimulatorImpl)
Callback< void, Ptr< Packet >, const UanAddress & > m_forUpCb
Forwarding up callback.
virtual void DoDispose(void)
This method is called by Object::Dispose or by the object's destructor, whichever comes first...
Address GetAddress(void)
Get the MAC Address.
virtual Address GetBroadcast(void) const
Get the broadcast address.
a polymophic address class
Virtual base class for all UAN MAC protocols.
A class used for addressing UAN MAC's.
static UanAddress ConvertFrom(const Address &address)
Convert a generic address to a UanAddress.
void RxPacketGood(Ptr< Packet > pkt, double sinr, UanTxMode txMode)
Receive packet from lower layer (passed to PHY as callback).
virtual void SetForwardUpCb(Callback< void, Ptr< Packet >, const UanAddress & > cb)
Set the callback to forward packets up to higher layers.
Abstraction of packet modulation information.
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.
static UanAddress GetBroadcast(void)
Get the broadcast address (255).
virtual void Clear(void)
Clears all pointer references.
virtual bool Enqueue(Ptr< Packet > pkt, const Address &dest, uint16_t protocolNumber)
Enqueue packet to be transmitted.
static Time Now(void)
Return the "current simulation 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)
NS_LOG_COMPONENT_DEFINE("UanMacAloha")
virtual void DoDispose()
This method is called by Object::Dispose or by the object's destructor, whichever comes first...
a base class which provides memory management and object aggregation
int64_t AssignStreams(int64_t stream)
Assign a fixed random variable stream number to the random variables used by this model...
UanAddress m_address
The MAC address.
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
void AddHeader(const Header &header)
Add header to this packet.