11#ifndef LR_WPAN_NET_DEVICE_H
12#define LR_WPAN_NET_DEVICE_H
16#include <ns3/net-device.h>
17#include <ns3/traced-callback.h>
162 bool SetMtu(
const uint16_t mtu)
override;
163 uint16_t
GetMtu()
const override;
177 uint16_t protocolNumber)
override;
a polymophic address class
Ipv4 addresses are stored in host order in this class.
Describes an IPv6 address.
This class can contain 16 bit addresses.
Network layer to device interface.
Smart pointer class similar to boost::intrusive_ptr.
Forward calls to a chain of Callback.
a unique identifier for an interface.
Network layer to device interface.
bool SupportsSendFrom() const override
void LinkDown()
Mark NetDevice link as down.
Address GetMulticast(Ipv4Address multicastGroup) const override
Make and return a MAC multicast address using the provided multicast group.
bool Send(Ptr< Packet > packet, const Address &dest, uint16_t protocolNumber) override
Ptr< LrWpanPhy > m_phy
The PHY for this NetDevice.
bool NeedsArp() const override
uint32_t m_ifIndex
The interface index of this NetDevice.
void LinkUp()
Mark NetDevice link as up.
PseudoMacAddressMode_e m_pseudoMacMode
How the pseudo MAC address is created.
Ptr< LrWpanMac > m_mac
The MAC for this NetDevice.
Ptr< LrWpanMac > GetMac() const
Get the MAC used by this NetDevice.
uint16_t GetMtu() const override
int64_t AssignStreams(int64_t stream)
Assign a fixed random variable stream number to the random variables used by this model.
void SetIfIndex(const uint32_t index) override
bool SendFrom(Ptr< Packet > packet, const Address &source, const Address &dest, uint16_t protocolNumber) override
void SetAddress(Address address) override
This method indirects to LrWpanMac::SetShortAddress ()
ReceiveCallback m_receiveCallback
Upper layer callback used for notification of new data packet arrivals.
bool m_configComplete
True if MAC, PHY and CSMA/CA where successfully configured and the NetDevice is ready for being used.
bool SetMtu(const uint16_t mtu) override
Ptr< SpectrumChannel > DoGetChannel() const
Attribute accessor method for the "Channel" attribute.
bool m_useAcks
Configure the NetDevice to request MAC layer acknowledgments when sending packets using the Send() AP...
void SetPanAssociation(uint16_t panId, Mac64Address coordExtAddr, Mac16Address coordShortAddr, Mac16Address assignedShortAddr)
This method is use to manually configure the coordinator through which the device or coordinator is a...
Address GetAddress() const override
This method indirects to LrWpanMac::SetShortAddress ()
bool IsLinkUp() const override
void AddLinkChangeCallback(Callback< void > callback) override
uint32_t GetIfIndex() const override
PseudoMacAddressMode_e
How the pseudo-MAC address is built from the short address (XXXX) and the PanId (YYYY).
@ RFC4944
YYYY:0000:XXXX (with U/L bit set to local)
void SetCsmaCa(Ptr< LrWpanCsmaCa > csmaca)
Set the CSMA/CA implementation to be used by the MAC and this NetDevice.
bool IsBroadcast() const override
void CompleteConfig()
Configure PHY, MAC and CSMA/CA.
void SetPromiscReceiveCallback(PromiscReceiveCallback cb) override
Ptr< LrWpanCsmaCa > m_csmaca
The CSMA/CA implementation for this NetDevice.
TracedCallback m_linkChanges
Trace source for link up/down changes.
Address GetBroadcast() const override
Ptr< Channel > GetChannel() const override
Mac48Address BuildPseudoMacAddress(uint16_t panId, Mac16Address shortAddr) const
Builds a "pseudo 48-bit address" from the PanId and Short Address The form is PanId : 0x0 : 0x0 : Sho...
Ptr< LrWpanCsmaCa > GetCsmaCa() const
Get the CSMA/CA implementation used by this NetDevice.
void SetPhy(Ptr< LrWpanPhy > phy)
Set the PHY to be used by the MAC and this NetDevice.
void DoDispose() override
Destructor implementation.
bool IsPointToPoint() const override
Return true if the net device is on a point-to-point link.
void SetChannel(Ptr< SpectrumChannel > channel)
Set the channel to which the NetDevice, and therefore the PHY, should be attached to.
Ptr< LrWpanPhy > GetPhy() const
Get the PHY used by this NetDevice.
bool m_linkUp
Is the link/device currently up and running?
bool IsBridge() const override
Return true if the net device is acting as a bridge.
void SetNode(Ptr< Node > node) override
~LrWpanNetDevice() override
bool IsMulticast() const override
static TypeId GetTypeId()
Get the type ID.
void McpsDataIndication(McpsDataIndicationParams params, Ptr< Packet > pkt)
The callback used by the MAC to hand over incoming packets to the NetDevice.
void SetReceiveCallback(NetDevice::ReceiveCallback cb) override
void DoInitialize() override
Initialize() implementation.
void SetMac(Ptr< LrWpanMac > mac)
Set the MAC to be used by this NetDevice.
Ptr< Node > m_node
The node associated with this NetDevice.
Ptr< Node > GetNode() const override
Every class exported by the ns3 library is enclosed in the ns3 namespace.
MCPS-DATA.indication params.