23 #ifndef LR_WPAN_NET_DEVICE_H
24 #define LR_WPAN_NET_DEVICE_H
26 #include <ns3/net-device.h>
27 #include <ns3/traced-callback.h>
28 #include <ns3/lr-wpan-mac.h>
34 class SpectrumChannel;
113 virtual void SetIfIndex (
const uint32_t index);
126 virtual bool SetMtu (
const uint16_t mtu);
127 virtual uint16_t
GetMtu (
void)
const;
virtual bool Send(Ptr< Packet > packet, const Address &dest, uint16_t protocolNumber)
virtual void SetNode(Ptr< Node > node)
virtual void AddLinkChangeCallback(Callback< void > callback)
Smart pointer class similar to boost::intrusive_ptr.
bool m_useAcks
Configure the NetDevice to request MAC layer acknowledgments when sending packets using the Send() AP...
ReceiveCallback m_receiveCallback
Upper layer callback used for notification of new data packet arrivals.
Ptr< LrWpanPhy > GetPhy(void) const
Get the PHY used by this NetDevice.
static TypeId GetTypeId(void)
Get the type ID.
TracedCallback m_linkChanges
Trace source for link up/down changes.
Forward calls to a chain of Callback.
virtual bool IsPointToPoint(void) const
Return true if the net device is on a point-to-point link.
virtual bool NeedsArp(void) const
virtual void SetReceiveCallback(NetDevice::ReceiveCallback cb)
virtual bool SendFrom(Ptr< Packet > packet, const Address &source, const Address &dest, uint16_t protocolNumber)
virtual void SetPromiscReceiveCallback(PromiscReceiveCallback cb)
virtual Ptr< Node > GetNode(void) const
Ptr< SpectrumChannel > DoGetChannel(void) const
Attribute accessor method for the "Channel" attribute.
virtual void DoDispose(void)
Destructor implementation.
virtual Ptr< Channel > GetChannel(void) const
Network layer to device interface.
virtual bool IsMulticast(void) const
a polymophic address class
virtual void SetAddress(Address address)
This method indirects to LrWpanMac::SetShortAddress ()
void SetPhy(Ptr< LrWpanPhy > phy)
Set the PHY to be used by the MAC and this NetDevice.
int64_t AssignStreams(int64_t stream)
Assign a fixed random variable stream number to the random variables used by this model...
Ptr< LrWpanMac > m_mac
The MAC for this NetDevice.
virtual void SetIfIndex(const uint32_t index)
void SetChannel(Ptr< SpectrumChannel > channel)
Set the channel to which the NetDevice, and therefore the PHY, should be attached to...
Ptr< LrWpanCsmaCa > m_csmaca
The CSMA/CA implementation for this NetDevice.
virtual void DoInitialize(void)
Initialize() implementation.
void LinkDown(void)
Mark NetDevice link as down.
void SetMac(Ptr< LrWpanMac > mac)
Set the MAC to be used by this NetDevice.
virtual uint32_t GetIfIndex(void) const
bool m_linkUp
Is the link/device currently up and running?
Every class exported by the ns3 library is enclosed in the ns3 namespace.
virtual bool IsBridge(void) const
Return true if the net device is acting as a bridge.
virtual bool SupportsSendFrom(void) const
Ptr< LrWpanPhy > m_phy
The PHY for this NetDevice.
void CompleteConfig(void)
Configure PHY, MAC and CSMA/CA.
uint32_t m_ifIndex
The interface index of this NetDevice.
virtual Address GetBroadcast(void) const
virtual Address GetAddress(void) const
This method indirects to LrWpanMac::SetShortAddress ()
void McpsDataIndication(McpsDataIndicationParams params, Ptr< Packet > pkt)
The callback used by the MAC to hand over incoming packets to the NetDevice.
virtual ~LrWpanNetDevice(void)
Describes an IPv6 address.
Ipv4 addresses are stored in host order in this class.
Network layer to device interface.
void LinkUp(void)
Mark NetDevice link as up.
virtual Address GetMulticast(Ipv4Address multicastGroup) const
Make and return a MAC multicast address using the provided multicast group.
Ptr< Node > m_node
The node associated with this NetDevice.
virtual uint16_t GetMtu(void) const
virtual bool IsBroadcast(void) const
virtual bool IsLinkUp(void) const
bool m_configComplete
True if MAC, PHY and CSMA/CA where successfully configured and the NetDevice is ready for being used...
void SetCsmaCa(Ptr< LrWpanCsmaCa > csmaca)
Set the CSMA/CA implementation to be used by the MAC and this NetDevice.
a unique identifier for an interface.
virtual bool SetMtu(const uint16_t mtu)
Ptr< LrWpanCsmaCa > GetCsmaCa(void) const
Get the CSMA/CA implementation used by this NetDevice.
MCPS-DATA.indication params.
Ptr< LrWpanMac > GetMac(void) const
Get the MAC used by this NetDevice.