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 uint16_t GetMtu(void) const
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...
virtual Address GetBroadcast(void) const
ReceiveCallback m_receiveCallback
Upper layer callback used for notification of new data packet arrivals.
static TypeId GetTypeId(void)
Get the type ID.
TracedCallback m_linkChanges
Trace source for link up/down changes.
virtual uint32_t GetIfIndex(void) const
Forward calls to a chain of Callback.
virtual bool SupportsSendFrom(void) const
virtual void SetReceiveCallback(NetDevice::ReceiveCallback cb)
virtual bool SendFrom(Ptr< Packet > packet, const Address &source, const Address &dest, uint16_t protocolNumber)
virtual Address GetAddress(void) const
This method indirects to LrWpanMac::SetShortAddress ()
virtual void SetPromiscReceiveCallback(PromiscReceiveCallback cb)
virtual void DoDispose(void)
Destructor implementation.
virtual bool IsBridge(void) const
Return true if the net device is acting as a bridge.
Network layer to device interface.
a polymophic address class
Ptr< LrWpanPhy > GetPhy(void) const
Get the PHY used by this NetDevice.
virtual void SetAddress(Address address)
This method indirects to LrWpanMac::SetShortAddress ()
virtual Ptr< Channel > GetChannel(void) const
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.
virtual bool IsMulticast(void) const
void LinkDown(void)
Mark NetDevice link as down.
void SetMac(Ptr< LrWpanMac > mac)
Set the MAC to be used by this NetDevice.
bool m_linkUp
Is the link/device currently up and running?
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Ptr< LrWpanPhy > m_phy
The PHY for this NetDevice.
void CompleteConfig(void)
Configure PHY, MAC and CSMA/CA.
Ptr< SpectrumChannel > DoGetChannel(void) const
Attribute accessor method for the "Channel" attribute.
uint32_t m_ifIndex
The interface index of this NetDevice.
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.
virtual bool IsPointToPoint(void) const
Return true if the net device is on a point-to-point link.
Network layer to device interface.
void LinkUp(void)
Mark NetDevice link as up.
Ptr< LrWpanCsmaCa > GetCsmaCa(void) const
Get the CSMA/CA implementation used by this NetDevice.
Ptr< Node > m_node
The node associated with this NetDevice.
virtual Ptr< Node > GetNode(void) const
virtual bool IsLinkUp(void) const
virtual Address GetMulticast(Ipv4Address multicastGroup) const
Make and return a MAC multicast address using the provided multicast group.
Ptr< LrWpanMac > GetMac(void) const
Get the MAC used by this NetDevice.
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)
virtual bool IsBroadcast(void) const
MCPS-DATA.indication params.
virtual bool NeedsArp(void) const