19 #ifndef WAVE_NET_DEVICE_H
20 #define WAVE_NET_DEVICE_H
29 #include "ns3/mac48-address.h"
30 #include "ns3/packet.h"
31 #include "ns3/traced-callback.h"
32 #include "ns3/wifi-net-device.h"
42 class ChannelScheduler;
94 uint32_t powerLevel = 8)
192 std::map<uint32_t, Ptr<OcbWifiMac>>
GetMacs()
const;
205 const std::vector<Ptr<WifiPhy>>&
GetPhys()
const override;
249 bool StopSch(uint32_t channelNumber);
260 bool StopVsa(uint32_t channelNumber);
339 void SetIfIndex(
const uint32_t index)
override;
344 bool SetMtu(
const uint16_t mtu)
override;
345 uint16_t
GetMtu()
const override;
360 uint16_t protocolNumber)
override;
393 typedef std::map<uint32_t, Ptr<OcbWifiMac>>::const_iterator
MacEntitiesI;
a polymophic address class
Ipv4 addresses are stored in host order in this class.
Describes an IPv6 address.
Forward calls to a chain of Callback.
a unique identifier for an interface.
This class holds together multiple, ns3::WifiPhy, and ns3::OcbWifiMac (including ns3::WifiRemoteStati...
bool Send(Ptr< Packet > packet, const Address &dest, uint16_t protocolNumber) override
void AddPhy(Ptr< WifiPhy > phy)
bool IsPointToPoint() const override
Return true if the net device is on a point-to-point link.
void SetChannelCoordinator(Ptr< ChannelCoordinator > channelCoordinator)
bool StartSch(const SchInfo &schInfo)
void ChangeAddress(Address newAddress)
bool IsBridge() const override
Return true if the net device is acting as a bridge.
bool DeleteTxProfile(uint32_t channelNumber)
void AddMac(uint32_t channelNumber, Ptr< OcbWifiMac > mac)
bool IsLinkUp() const override
Address GetAddress() const override
void DoDispose() override
Destructor implementation.
NetDevice::ReceiveCallback m_forwardUp
forward up receive callback
void SetAddress(Address address) override
Set the address of this interface.
void SetChannelScheduler(Ptr< ChannelScheduler > channelScheduler)
Ptr< VsaManager > m_vsaManager
the VSA manager
std::vector< Ptr< WifiPhy > > PhyEntities
PhyEntities typedef.
Address GetBroadcast() const override
PhyEntities m_phyEntities
Phy entities.
Ptr< ChannelScheduler > m_channelScheduler
the channel scheduler
std::map< uint32_t, Ptr< OcbWifiMac > >::const_iterator MacEntitiesI
MacEntities iterator typedef.
static const uint16_t MAX_MSDU_SIZE
This value conforms to the 802.11 specification.
void SetVsaManager(Ptr< VsaManager > vsaManager)
uint32_t m_ifIndex
IF index.
void SetPromiscReceiveCallback(PromiscReceiveCallback cb) override
MacEntities m_macEntities
MAC entities.
Ptr< ChannelScheduler > GetChannelScheduler() const
void ForwardUp(Ptr< const Packet > packet, Mac48Address from, Mac48Address to)
Receive a packet from the lower layer and pass the packet up the stack.
static TypeId GetTypeId()
Get the type ID.
void SetReceiveCallback(NetDevice::ReceiveCallback cb) override
bool StopVsa(uint32_t channelNumber)
uint16_t GetMtu() const override
const std::vector< Ptr< WifiPhy > > & GetPhys() const override
bool SetMtu(const uint16_t mtu) override
static const uint16_t IPv6_PROT_NUMBER
IP v6 Protocol number.
std::map< uint32_t, Ptr< OcbWifiMac > > GetMacs() const
bool NeedsArp() const override
void DoInitialize() override
Initialize() implementation.
bool SendX(Ptr< Packet > packet, const Address &dest, uint32_t protocol, const TxInfo &txInfo)
bool RegisterTxProfile(const TxProfile &txprofile)
TracedCallback< Address, Address > m_addressChange
NetDevice::PromiscReceiveCallback m_promiscRx
promiscious receive callback
bool IsMulticast() const override
void CancelTx(uint32_t channelNumber, AcIndex ac)
std::map< uint32_t, Ptr< OcbWifiMac > > MacEntities
MacEntities typedef.
uint32_t GetIfIndex() const override
Callback< bool, Ptr< const Packet >, const Address &, uint32_t, uint32_t > WaveVsaCallback
bool IsBroadcast() const override
Ptr< ChannelCoordinator > m_channelCoordinator
the channel coordinator
bool SendFrom(Ptr< Packet > packet, const Address &source, const Address &dest, uint16_t protocolNumber) override
void AddLinkChangeCallback(Callback< void > callback) override
Ptr< ChannelCoordinator > GetChannelCoordinator() const
bool IsAvailableChannel(uint32_t channelNumber) const
void SetWaveVsaCallback(WaveVsaCallback vsaCallback)
std::vector< Ptr< WifiPhy > >::const_iterator PhyEntitiesI
PhyEntities iterator typedef.
Address GetMulticast(Ipv4Address multicastGroup) const override
Make and return a MAC multicast address using the provided multicast group.
TxProfile * m_txProfile
transmit profile
Ptr< VsaManager > GetVsaManager() const
~WaveNetDevice() override
void SetChannelManager(Ptr< ChannelManager > channelManager)
Ptr< Channel > GetChannel() const override
bool SupportsSendFrom() const override
Ptr< ChannelManager > GetChannelManager() const
bool StartVsa(const VsaInfo &vsaInfo)
Ptr< ChannelManager > m_channelManager
the channel manager
static const uint16_t IPv4_PROT_NUMBER
IP v4 Protocol number.
bool StopSch(uint32_t channelNumber)
void SetIfIndex(const uint32_t index) override
represent a single transmission mode
Hold together all Wifi-related objects.
Ptr< WifiMac > GetMac() const
Ptr< WifiPhy > GetPhy() const
WifiPreamble
The type of preamble to be used by an IEEE 802.11 transmission.
AcIndex
This enumeration defines the Access Categories as an enumeration with values corresponding to the AC ...
Every class exported by the ns3 library is enclosed in the ns3 namespace.
uint32_t txPowerLevel
transmit power level
uint32_t priority
priority
TxInfo(uint32_t channel, uint32_t prio=7, WifiMode rate=WifiMode(), WifiPreamble preamble=WIFI_PREAMBLE_LONG, uint32_t powerLevel=8)
Initializer.
WifiMode dataRate
data rate
WifiPreamble preamble
preamble
uint32_t channelNumber
channel number
uint32_t txPowerLevel
transmit power level
WifiMode dataRate
data rate
WifiPreamble preamble
preamble
uint32_t channelNumber
channel number
TxProfile(uint32_t channel, bool adapt=true, uint32_t powerLevel=4)
Initializer.