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