This class holds together multiple, ns3::WifiPhy, and ns3::OcbWifiMac (including ns3::WifiRemoteStationManager). More...
#include <wave-net-device.h>
Public Types | |
typedef Callback< bool, Ptr< const Packet >, const Address &, uint32_t, uint32_t > | WaveVsaCallback |
![]() | |
enum | PacketType { PACKET_HOST = 1, NS3_PACKET_HOST = PACKET_HOST, PACKET_BROADCAST, NS3_PACKET_BROADCAST = PACKET_BROADCAST, PACKET_MULTICAST, NS3_PACKET_MULTICAST = PACKET_MULTICAST, PACKET_OTHERHOST, NS3_PACKET_OTHERHOST = PACKET_OTHERHOST } |
Packet types are used as they are in Linux. More... | |
typedef Callback< bool, Ptr< NetDevice >, Ptr< const Packet >, uint16_t, const Address &, const Address &, enum PacketType > | PromiscReceiveCallback |
typedef Callback< bool, Ptr< NetDevice >, Ptr< const Packet >, uint16_t, const Address & > | ReceiveCallback |
Public Member Functions | |
WaveNetDevice (void) | |
virtual | ~WaveNetDevice (void) |
virtual void | AddLinkChangeCallback (Callback< void > callback) |
void | AddMac (uint32_t channelNumber, Ptr< OcbWifiMac > mac) |
void | AddPhy (Ptr< WifiPhy > phy) |
void | CancelTx (uint32_t channelNumber, enum AcIndex ac) |
void | ChangeAddress (Address newAddress) |
bool | DeleteTxProfile (uint32_t channelNumber) |
virtual Address | GetAddress (void) const |
virtual Address | GetBroadcast (void) const |
virtual Ptr< Channel > | GetChannel (void) const |
Ptr< ChannelCoordinator > | GetChannelCoordinator (void) const |
Ptr< ChannelManager > | GetChannelManager (void) const |
Ptr< ChannelScheduler > | GetChannelScheduler (void) const |
virtual uint32_t | GetIfIndex (void) const |
Ptr< OcbWifiMac > | GetMac (uint32_t channelNumber) const |
std::map< uint32_t, Ptr< OcbWifiMac > > | GetMacs (void) const |
virtual uint16_t | GetMtu (void) const |
virtual Address | GetMulticast (Ipv4Address multicastGroup) const |
Make and return a MAC multicast address using the provided multicast group. More... | |
virtual Address | GetMulticast (Ipv6Address addr) const |
Get the MAC multicast address corresponding to the IPv6 address provided. More... | |
virtual Ptr< Node > | GetNode (void) const |
Ptr< WifiPhy > | GetPhy (uint32_t index) const |
std::vector< Ptr< WifiPhy > > | GetPhys (void) const |
Ptr< VsaManager > | GetVsaManager (void) const |
virtual bool | IsBridge (void) const |
Return true if the net device is acting as a bridge. More... | |
virtual bool | IsBroadcast (void) const |
virtual bool | IsLinkUp (void) const |
virtual bool | IsMulticast (void) const |
virtual bool | IsPointToPoint (void) const |
Return true if the net device is on a point-to-point link. More... | |
virtual bool | NeedsArp (void) const |
bool | RegisterTxProfile (const TxProfile &txprofile) |
virtual bool | Send (Ptr< Packet > packet, const Address &dest, uint16_t protocolNumber) |
virtual bool | SendFrom (Ptr< Packet > packet, const Address &source, const Address &dest, uint16_t protocolNumber) |
bool | SendX (Ptr< Packet > packet, const Address &dest, uint32_t protocol, const TxInfo &txInfo) |
virtual void | SetAddress (Address address) |
Set the address of this interface. More... | |
void | SetChannelCoordinator (Ptr< ChannelCoordinator > channelCoordinator) |
void | SetChannelManager (Ptr< ChannelManager > channelManager) |
void | SetChannelScheduler (Ptr< ChannelScheduler > channelScheduler) |
virtual void | SetIfIndex (const uint32_t index) |
virtual bool | SetMtu (const uint16_t mtu) |
virtual void | SetNode (Ptr< Node > node) |
virtual void | SetPromiscReceiveCallback (PromiscReceiveCallback cb) |
virtual void | SetReceiveCallback (NetDevice::ReceiveCallback cb) |
void | SetVsaManager (Ptr< VsaManager > vsaManager) |
void | SetWaveVsaCallback (WaveVsaCallback vsaCallback) |
bool | StartSch (const SchInfo &schInfo) |
bool | StartVsa (const VsaInfo &vsaInfo) |
bool | StopSch (uint32_t channelNumber) |
bool | StopVsa (uint32_t channelNumber) |
virtual bool | SupportsSendFrom (void) const |
![]() | |
virtual | ~NetDevice () |
![]() | |
Object () | |
Constructor. More... | |
virtual | ~Object () |
Destructor. More... | |
void | AggregateObject (Ptr< Object > other) |
Aggregate two Objects together. More... | |
void | Dispose (void) |
Dispose of this Object. More... | |
AggregateIterator | GetAggregateIterator (void) const |
Get an iterator to the Objects aggregated to this one. More... | |
virtual TypeId | GetInstanceTypeId (void) const |
Implement the GetInstanceTypeId method defined in ObjectBase. More... | |
template<typename T > | |
Ptr< T > | GetObject (void) const |
Get a pointer to the requested aggregated Object. More... | |
template<typename T > | |
Ptr< T > | GetObject (TypeId tid) const |
Get a pointer to the requested aggregated Object. More... | |
void | Initialize (void) |
Invoke DoInitialize on all Objects aggregated to this one. More... | |
![]() | |
SimpleRefCount () | |
Constructor. More... | |
SimpleRefCount (const SimpleRefCount &o) | |
Copy constructor. More... | |
uint32_t | GetReferenceCount (void) const |
Get the reference count of the object. More... | |
SimpleRefCount & | operator= (const SimpleRefCount &o) |
Assignment. More... | |
void | Ref (void) const |
Increment the reference count. More... | |
void | Unref (void) const |
Decrement the reference count. More... | |
![]() | |
virtual | ~ObjectBase () |
Virtual destructor. More... | |
void | GetAttribute (std::string name, AttributeValue &value) const |
Get the value of an attribute, raising fatal errors if unsuccessful. More... | |
bool | GetAttributeFailSafe (std::string name, AttributeValue &value) const |
Get the value of an attribute without raising erros. More... | |
void | SetAttribute (std::string name, const AttributeValue &value) |
Set a single attribute, raising fatal errors if unsuccessful. More... | |
bool | SetAttributeFailSafe (std::string name, const AttributeValue &value) |
Set a single attribute without raising errors. More... | |
bool | TraceConnect (std::string name, std::string context, const CallbackBase &cb) |
Connect a TraceSource to a Callback with a context. More... | |
bool | TraceConnectWithoutContext (std::string name, const CallbackBase &cb) |
Connect a TraceSource to a Callback without a context. More... | |
bool | TraceDisconnect (std::string name, std::string context, const CallbackBase &cb) |
Disconnect from a TraceSource a Callback previously connected with a context. More... | |
bool | TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb) |
Disconnect from a TraceSource a Callback previously connected without a context. More... | |
Static Public Member Functions | |
static TypeId | GetTypeId (void) |
![]() | |
static TypeId | GetTypeId (void) |
Get the type ID. More... | |
![]() | |
static TypeId | GetTypeId (void) |
Register this type. More... | |
![]() | |
static void | Cleanup (void) |
Noop. More... | |
![]() | |
static TypeId | GetTypeId (void) |
Get the type ID. More... | |
Private Types | |
typedef std::map< uint32_t, Ptr< OcbWifiMac > > | MacEntities |
typedef std::map< uint32_t, Ptr< OcbWifiMac > >::const_iterator | MacEntitiesI |
typedef std::vector< Ptr< WifiPhy > > | PhyEntities |
typedef std::vector< Ptr< WifiPhy > >::const_iterator | PhyEntitiesI |
Private Member Functions | |
virtual void | DoDispose (void) |
Destructor implementation. More... | |
virtual void | DoInitialize (void) |
Initialize() implementation. More... | |
void | ForwardUp (Ptr< Packet > packet, Mac48Address from, Mac48Address to) |
Receive a packet from the lower layer and pass the packet up the stack. More... | |
bool | IsAvailableChannel (uint32_t channelNumber) const |
Static Private Attributes | |
static const uint16_t | IPv4_PROT_NUMBER = 0x0800 |
static const uint16_t | IPv6_PROT_NUMBER = 0x86DD |
static const uint16_t | MAX_MSDU_SIZE = 2304 |
Additional Inherited Members | |
![]() | |
Object (const Object &o) | |
Copy an Object. More... | |
virtual void | NotifyNewAggregate (void) |
Notify all Objects aggregated to this one of a new Object being aggregated. More... | |
![]() | |
void | ConstructSelf (const AttributeConstructionList &attributes) |
Complete construction of ObjectBase; invoked by derived classes. More... | |
virtual void | NotifyConstructionCompleted (void) |
Notifier called once the ObjectBase is fully constructed. More... | |
![]() | |
static TypeId | GetObjectIid (void) |
Ensure the TypeId for ObjectBase gets fully configured to anchor the inheritance tree properly. More... | |
This class holds together multiple, ns3::WifiPhy, and ns3::OcbWifiMac (including ns3::WifiRemoteStationManager).
Besides that, to support multiple channel operation this class also holds ns3::ChannelScheduler, ns3::ChannelManager, ns3::ChannelCoordinator and ns3::VsaManager.
these primitives specified in the standard will not be implemented because of limited use in simulation: void StartTimingAdvertisement (); void StopTimingAdvertisement (); UtcTime GetUtcTime (); void SetUtcTime ();
ns3::WaveNetDevice is accessible through the following paths with Config::Set and Config::Connect:
No TraceSources are defined for this type.
Size of this type is 192 bytes (on a 64-bit architecture).
Definition at line 128 of file wave-net-device.h.
|
private |
Definition at line 343 of file wave-net-device.h.
|
private |
Definition at line 344 of file wave-net-device.h.
|
private |
Definition at line 346 of file wave-net-device.h.
|
private |
Definition at line 347 of file wave-net-device.h.
typedef Callback<bool, Ptr<const Packet>,const Address &, uint32_t, uint32_t> ns3::WaveNetDevice::WaveVsaCallback |
packet | the packet is Vendor Specific Action frame. |
address | the address of the MAC from which the management frame was received. |
managementID | identify the originator of the data. Values are specified in IEEE P1609.0 with range 0-15. |
channelNumber | the channel on which the frame was received. |
Definition at line 227 of file wave-net-device.h.
ns3::WaveNetDevice::WaveNetDevice | ( | void | ) |
Definition at line 86 of file wave-net-device.cc.
References NS_LOG_FUNCTION.
|
virtual |
Definition at line 92 of file wave-net-device.cc.
References NS_LOG_FUNCTION.
|
virtual |
callback | the callback to invoke |
Add a callback invoked whenever the link status changes to UP. This callback is typically used by the IP/ARP layer to flush the ARP cache and by IPv6 stack to flush NDISC cache whenever the link goes up.
Implements ns3::NetDevice.
Definition at line 555 of file wave-net-device.cc.
References NS_LOG_WARN.
void ns3::WaveNetDevice::AddMac | ( | uint32_t | channelNumber, |
Ptr< OcbWifiMac > | mac | ||
) |
channelNumber | the specific channel |
mac | add a new available MAC entity for specific channel |
Definition at line 176 of file wave-net-device.cc.
References ns3::ChannelManager::IsWaveChannel(), m_macEntities, NS_FATAL_ERROR, and NS_LOG_FUNCTION.
Referenced by ns3::WaveHelper::Install().
phy | add a new available PHY entity |
Definition at line 209 of file wave-net-device.cc.
References m_phyEntities, NS_FATAL_ERROR, and NS_LOG_FUNCTION.
Referenced by ns3::WaveHelper::Install().
void ns3::WaveNetDevice::CancelTx | ( | uint32_t | channelNumber, |
enum AcIndex | ac | ||
) |
channelNumber | the specific channel number |
ac | the specific access category |
Cancel all transmissions with the particular category and channel number.
Definition at line 451 of file wave-net-device.cc.
References ns3::OcbWifiMac::CancleTx(), GetMac(), and IsAvailableChannel().
void ns3::WaveNetDevice::ChangeAddress | ( | Address | newAddress | ) |
newAddress | an immediate MAC-layer address change is required |
This method is similar with SetAddress method, but SetAddress is suggested for initializing a device, while this method is preferred for changing address and a addressChange TracedCallback will be called.
Definition at line 432 of file wave-net-device.cc.
References GetAddress(), m_addressChange, m_macEntities, NS_LOG_FUNCTION, and SetAddress().
bool ns3::WaveNetDevice::DeleteTxProfile | ( | uint32_t | channelNumber | ) |
channelNumber | the specific channel number delete a registered transmitter profile in the MLME after the associated IP-based data transfer is complete |
Definition at line 349 of file wave-net-device.cc.
References ns3::TxProfile::channelNumber, IsAvailableChannel(), m_txProfile, and NS_LOG_FUNCTION.
Referenced by WaveNetDeviceExample::SendIpExample().
|
privatevirtual |
Destructor implementation.
This method is called by Dispose() or by the Object's destructor, whichever comes first.
Subclasses are expected to implement their real destruction code in an overriden version of this method and chain up to their parent's implementation once they are done. i.e, for simplicity, the destructor of every subclass should be empty and its content should be moved to the associated DoDispose() method.
It is safe to call GetObject() from within this method.
Reimplemented from ns3::Object.
Definition at line 98 of file wave-net-device.cc.
References ns3::Object::Dispose(), ns3::Object::DoDispose(), ns3::RegularWifiMac::GetWifiRemoteStationManager(), m_channelCoordinator, m_channelManager, m_channelScheduler, m_macEntities, m_phyEntities, m_txProfile, m_vsaManager, and NS_LOG_FUNCTION.
|
privatevirtual |
Initialize() implementation.
This method is called only once by Initialize(). If the user calls Initialize() multiple times, DoInitialize() is called only the first time.
Subclasses are expected to override this method and chain up to their parent's implementation once they are done. It is safe to call GetObject() and AggregateObject() from within this method.
Reimplemented from ns3::Object.
Definition at line 133 of file wave-net-device.cc.
References ns3::Object::DoInitialize(), ForwardUp(), ns3::RegularWifiMac::GetWifiRemoteStationManager(), ns3::Object::Initialize(), m_channelCoordinator, m_channelManager, m_channelScheduler, m_macEntities, m_phyEntities, m_vsaManager, ns3::MakeCallback(), NS_FATAL_ERROR, NS_LOG_FUNCTION, ns3::RegularWifiMac::SetForwardUpCallback(), and ns3::OcbWifiMac::Suspend().
|
private |
Receive a packet from the lower layer and pass the packet up the stack.
packet | |
from | |
to |
Definition at line 675 of file wave-net-device.cc.
References CCH, GetAddress(), GetMac(), ns3::LlcSnapHeader::GetType(), ns3::Mac48Address::IsBroadcast(), ns3::Mac48Address::IsGroup(), ns3::Callback< R, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::IsNull(), m_forwardUp, m_promiscRx, ns3::WifiMac::NotifyPromiscRx(), ns3::WifiMac::NotifyRx(), NS_LOG_FUNCTION, ns3::NetDevice::PACKET_BROADCAST, ns3::NetDevice::PACKET_HOST, ns3::NetDevice::PACKET_MULTICAST, ns3::NetDevice::PACKET_OTHERHOST, and ns3::Packet::RemoveHeader().
Referenced by DoInitialize().
|
virtual |
Implements ns3::NetDevice.
Definition at line 527 of file wave-net-device.cc.
Referenced by ChangeAddress(), ForwardUp(), and AnnexC_TestCase::SendPacket().
|
virtual |
Calling this method is invalid if IsBroadcast returns not true.
Implements ns3::NetDevice.
Definition at line 565 of file wave-net-device.cc.
References ns3::Mac48Address::GetBroadcast().
Implements ns3::NetDevice.
Definition at line 513 of file wave-net-device.cc.
References ns3::WifiPhy::GetChannel(), GetPhy(), m_phyEntities, and NS_ASSERT.
Referenced by GetTypeId().
Ptr< ChannelCoordinator > ns3::WaveNetDevice::GetChannelCoordinator | ( | void | ) | const |
Definition at line 487 of file wave-net-device.cc.
References m_channelCoordinator.
Referenced by ns3::VsaManager::DoSendVsa(), GetTypeId(), ns3::DefaultChannelScheduler::SetWaveNetDevice(), and ns3::WaveMacLow::SetWaveNetDevice().
Ptr< ChannelManager > ns3::WaveNetDevice::GetChannelManager | ( | void | ) | const |
Definition at line 467 of file wave-net-device.cc.
References m_channelManager.
Referenced by ns3::VsaManager::DoSendVsa(), and GetTypeId().
Ptr< ChannelScheduler > ns3::WaveNetDevice::GetChannelScheduler | ( | void | ) | const |
Definition at line 477 of file wave-net-device.cc.
References m_channelScheduler.
Referenced by ns3::VsaManager::DoSendVsa(), GetTypeId(), ns3::WaveMacLow::SetWaveNetDevice(), ChannelAccessTestCase::TestAlternatingAfter(), ChannelAccessTestCase::TestContinuousAfter(), and ChannelAccessTestCase::TestExtendedAfter().
|
virtual |
Implements ns3::NetDevice.
Definition at line 508 of file wave-net-device.cc.
References m_ifIndex.
Ptr< OcbWifiMac > ns3::WaveNetDevice::GetMac | ( | uint32_t | channelNumber | ) | const |
channelNumber | the specific channel number |
Definition at line 190 of file wave-net-device.cc.
References m_macEntities, NS_FATAL_ERROR, and NS_LOG_FUNCTION.
Referenced by ns3::DefaultChannelScheduler::AssignDefaultCchAccess(), CancelTx(), ns3::VsaManager::DoSendVsa(), ForwardUp(), GetAddress(), ns3::DefaultChannelScheduler::NotifyGuardSlotStart(), Send(), SendX(), ns3::ChannelScheduler::StartSch(), SupportsSendFrom(), and ns3::DefaultChannelScheduler::SwitchToNextChannel().
std::map< uint32_t, Ptr< OcbWifiMac > > ns3::WaveNetDevice::GetMacs | ( | void | ) | const |
Definition at line 202 of file wave-net-device.cc.
References m_macEntities, and NS_LOG_FUNCTION.
Referenced by ns3::WaveHelper::AssignStreams(), and ns3::VsaManager::DoInitialize().
|
virtual |
This value is typically used by the IP layer to perform IP fragmentation when needed.
Implements ns3::NetDevice.
Definition at line 542 of file wave-net-device.cc.
References m_mtu.
Referenced by GetTypeId().
|
virtual |
Make and return a MAC multicast address using the provided multicast group.
RFC 1112 says that an Ipv4 host group address is mapped to an Ethernet multicast address by placing the low-order 23-bits of the IP address into the low-order 23 bits of the Ethernet multicast address 01-00-5E-00-00-00 (hex). Similar RFCs exist for Ipv6 and Eui64 mappings. This method performs the multicast address creation function appropriate to the underlying MAC address of the device. This MAC address is encapsulated in an abstract Address to avoid dependencies on the exact MAC address format.
In the case of net devices that do not support multicast, clients are expected to test NetDevice::IsMulticast and avoid attempting to map multicast packets. Subclasses of NetDevice that do support multicasting are expected to override this method and provide an implementation appropriate to the particular device.
multicastGroup | The IP address for the multicast group destination of the packet. |
Implements ns3::NetDevice.
Definition at line 575 of file wave-net-device.cc.
References ns3::Mac48Address::GetMulticast().
|
virtual |
Get the MAC multicast address corresponding to the IPv6 address provided.
addr | IPv6 address |
Implements ns3::NetDevice.
Definition at line 579 of file wave-net-device.cc.
References ns3::Mac48Address::GetMulticast().
When a subclass needs to get access to the underlying node base class to print the nodeid for example, it can invoke this method.
Implements ns3::NetDevice.
Definition at line 635 of file wave-net-device.cc.
References m_node.
index | the index of PHY entity |
Definition at line 219 of file wave-net-device.cc.
References m_phyEntities, and NS_LOG_FUNCTION.
Referenced by GetChannel(), and ns3::DefaultChannelScheduler::SetWaveNetDevice().
Definition at line 226 of file wave-net-device.cc.
References m_phyEntities, and NS_LOG_FUNCTION.
Referenced by ns3::WaveHelper::AssignStreams(), ns3::YansWavePhyHelper::EnablePcapInternal(), and ns3::DefaultChannelScheduler::SetWaveNetDevice().
|
static |
Definition at line 40 of file wave-net-device.cc.
References GetChannel(), GetChannelCoordinator(), GetChannelManager(), GetChannelScheduler(), GetMtu(), GetVsaManager(), ns3::LLC_SNAP_HEADER_LENGTH, m_macEntities, m_phyEntities, ns3::MakeObjectMapAccessor(), ns3::MakeObjectVectorAccessor(), ns3::MakePointerAccessor(), ns3::MakeUintegerAccessor(), MAX_MSDU_SIZE, SetChannelCoordinator(), SetChannelManager(), SetChannelScheduler(), SetMtu(), ns3::TypeId::SetParent(), and SetVsaManager().
Ptr< VsaManager > ns3::WaveNetDevice::GetVsaManager | ( | void | ) | const |
Definition at line 497 of file wave-net-device.cc.
References m_vsaManager.
Referenced by GetTypeId().
|
private |
channelNumber | the specific channel |
Definition at line 659 of file wave-net-device.cc.
References ns3::ChannelManager::IsWaveChannel(), m_macEntities, and NS_LOG_DEBUG.
Referenced by CancelTx(), DeleteTxProfile(), RegisterTxProfile(), SendX(), StartSch(), StartVsa(), StopSch(), and StopVsa().
|
virtual |
Return true if the net device is acting as a bridge.
Implements ns3::NetDevice.
Definition at line 589 of file wave-net-device.cc.
|
virtual |
Implements ns3::NetDevice.
Definition at line 560 of file wave-net-device.cc.
|
virtual |
Implements ns3::NetDevice.
Definition at line 547 of file wave-net-device.cc.
|
virtual |
Implements ns3::NetDevice.
Definition at line 570 of file wave-net-device.cc.
|
virtual |
Return true if the net device is on a point-to-point link.
Implements ns3::NetDevice.
Definition at line 584 of file wave-net-device.cc.
|
virtual |
Called by higher-layers to check if this NetDevice requires ARP to be used.
Implements ns3::NetDevice.
Definition at line 645 of file wave-net-device.cc.
bool ns3::WaveNetDevice::RegisterTxProfile | ( | const TxProfile & | txprofile | ) |
txprofile | transmit profile for IP-based data register a transmitter profile in the MLME before the associated IP-based data transfer starts. |
note: This method should be called before WaveNetDevice::Send method
Definition at line 304 of file wave-net-device.cc.
References CCH, ns3::TxProfile::channelNumber, ns3::TxProfile::dataRate, ns3::WifiMode::GetUniqueName(), IsAvailableChannel(), m_phyEntities, m_txProfile, NS_LOG_DEBUG, NS_LOG_FUNCTION, and ns3::TxProfile::txPowerLevel.
Referenced by WaveNetDeviceExample::SendIpExample().
|
virtual |
packet | packet sent from above down to Network Device |
dest | mac address of the destination (already resolved) |
protocolNumber | identifies the type of payload contained in this packet. Used to call the right L3Protocol when the packet is received. |
Normally this method is called by 1609.3 standard to send IP-based packets, however high layers can also send packets in other types except IP-based packets in CCH.
Implements ns3::NetDevice.
Definition at line 595 of file wave-net-device.cc.
References ns3::TxProfile::adaptable, ns3::Packet::AddHeader(), ns3::Packet::AddPacketTag(), ns3::TxProfile::channelNumber, ns3::Mac48Address::ConvertFrom(), ns3::TxProfile::dataRate, GetMac(), m_channelScheduler, m_txProfile, NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::WifiTxVector::SetMode(), ns3::WifiTxVector::SetTxPowerLevel(), ns3::LlcSnapHeader::SetType(), and ns3::TxProfile::txPowerLevel.
Referenced by ChannelRoutingTestCase::SendIp(), and WaveNetDeviceExample::SendIpPacket().
|
virtual |
packet | packet sent from above down to Network Device |
source | source mac address (so called "MAC spoofing") |
dest | mac address of the destination (already resolved) |
protocolNumber | identifies the type of payload contained in this packet. Used to call the right L3Protocol when the packet is received. |
Called from higher layer to send packet into Network Device with the specified source and destination Addresses.
Implements ns3::NetDevice.
Definition at line 718 of file wave-net-device.cc.
References NS_LOG_FUNCTION.
bool ns3::WaveNetDevice::SendX | ( | Ptr< Packet > | packet, |
const Address & | dest, | ||
uint32_t | protocol, | ||
const TxInfo & | txInfo | ||
) |
packet | packet sent from above down to Network Device |
dest | mac address of the destination (already resolved) |
protocol | identifies the type of payload contained in the packet. Used to call the right L3Protocol when the packet is received. |
txInfo | WSMP or other packets parameters for sending |
Normally this method is called by 1609.3 standard to send WSMP packets, however high layers can also send packets in other types except IP-based packets in CCH.
Definition at line 371 of file wave-net-device.cc.
References ns3::Packet::AddHeader(), ns3::Packet::AddPacketTag(), CCH, ns3::TxInfo::channelNumber, ns3::Mac48Address::ConvertFrom(), ns3::TxInfo::dataRate, GetMac(), IPv4_PROT_NUMBER, IPv6_PROT_NUMBER, IsAvailableChannel(), m_channelScheduler, m_phyEntities, NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::TxInfo::priority, ns3::WifiTxVector::SetMode(), ns3::WifiTxVector::SetTxPowerLevel(), ns3::LlcSnapHeader::SetType(), and ns3::TxInfo::txPowerLevel.
Referenced by WaveNetDeviceExample::SendOneWsmpPacket(), AnnexC_TestCase::SendPacket(), ChannelRoutingTestCase::SendWsmp(), and ChannelAccessTestCase::SendX().
|
virtual |
Set the address of this interface.
address | address to set |
Implements ns3::NetDevice.
Definition at line 519 of file wave-net-device.cc.
References ns3::Mac48Address::ConvertFrom(), and m_macEntities.
Referenced by ChangeAddress(), and ns3::WaveHelper::Install().
void ns3::WaveNetDevice::SetChannelCoordinator | ( | Ptr< ChannelCoordinator > | channelCoordinator | ) |
channelCoordinator | the channel coordinator for multiple channel operation |
Definition at line 482 of file wave-net-device.cc.
References m_channelCoordinator.
Referenced by GetTypeId(), and ns3::WaveHelper::Install().
void ns3::WaveNetDevice::SetChannelManager | ( | Ptr< ChannelManager > | channelManager | ) |
channelManager | the channel manager for multiple channel operation |
Definition at line 462 of file wave-net-device.cc.
References m_channelManager.
Referenced by GetTypeId(), and ns3::WaveHelper::Install().
void ns3::WaveNetDevice::SetChannelScheduler | ( | Ptr< ChannelScheduler > | channelScheduler | ) |
channelScheduler | the channel scheduler for multiple channel operation |
Definition at line 472 of file wave-net-device.cc.
References m_channelScheduler.
Referenced by GetTypeId(), and ns3::WaveHelper::Install().
|
virtual |
index | ifIndex of the device |
Implements ns3::NetDevice.
Definition at line 503 of file wave-net-device.cc.
References m_ifIndex.
|
virtual |
mtu | MTU value, in bytes, to set for the device |
Override for default MTU defined on a per-type basis.
Implements ns3::NetDevice.
Definition at line 532 of file wave-net-device.cc.
References ns3::LLC_SNAP_HEADER_LENGTH, m_mtu, and MAX_MSDU_SIZE.
Referenced by GetTypeId().
node | the node associated to this netdevice. |
This method is called from ns3::Node::AddDevice.
Implements ns3::NetDevice.
Definition at line 640 of file wave-net-device.cc.
References m_node.
|
virtual |
cb | callback to invoke whenever a packet has been received in promiscuous mode and must be forwarded to the higher layers. |
Enables netdevice promiscuous mode and sets the callback that will handle promiscuous mode packets. Note, promiscuous mode packets means all packets, including those packets that can be sensed by the netdevice but which are intended to be received by other hosts.
Implements ns3::NetDevice.
Definition at line 725 of file wave-net-device.cc.
References m_macEntities, and m_promiscRx.
|
virtual |
cb | callback to invoke whenever a packet has been received and must be forwarded to the higher layers. |
Set the callback to be used to notify higher layers when a packet has been received.
Implements ns3::NetDevice.
Definition at line 653 of file wave-net-device.cc.
References m_forwardUp.
Referenced by WaveNetDeviceExample::CreateWaveNodes(), ChannelAccessTestCase::DoRun(), and AnnexC_TestCase::DoRun().
void ns3::WaveNetDevice::SetVsaManager | ( | Ptr< VsaManager > | vsaManager | ) |
vsaManager | the VSA manager for multiple channel operation |
Definition at line 492 of file wave-net-device.cc.
References m_vsaManager.
Referenced by GetTypeId(), and ns3::WaveHelper::Install().
void ns3::WaveNetDevice::SetWaveVsaCallback | ( | WaveVsaCallback | vsaCallback | ) |
vsaCallback | the VSA receive callback for 1609 management information |
Definition at line 275 of file wave-net-device.cc.
References m_vsaManager, and NS_LOG_FUNCTION.
Referenced by WaveNetDeviceExample::CreateWaveNodes().
bool ns3::WaveNetDevice::StartSch | ( | const SchInfo & | schInfo | ) |
sch_info | the parameters about how to start SCH service |
Definition at line 282 of file wave-net-device.cc.
References ns3::SchInfo::channelNumber, IsAvailableChannel(), m_channelScheduler, and NS_LOG_FUNCTION.
Referenced by WaveNetDeviceExample::SendIpExample(), WaveNetDeviceExample::SendWsaExample(), WaveNetDeviceExample::SendWsmpExample(), ChannelAccessTestCase::TestAlternating(), ChannelAccessTestCase::TestContinuous(), and ChannelAccessTestCase::TestExtended().
bool ns3::WaveNetDevice::StartVsa | ( | const VsaInfo & | vsaInfo | ) |
vsa_info | the parameters about how to send VSA frame |
Definition at line 233 of file wave-net-device.cc.
References ns3::VsaInfo::channelNumber, IsAvailableChannel(), ns3::OrganizationIdentifier::IsNull(), m_channelScheduler, m_vsaManager, ns3::VsaInfo::managementId, NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::VsaInfo::oi, and ns3::VsaInfo::vsc.
Referenced by ChannelRoutingTestCase::SendWsa(), and WaveNetDeviceExample::SendWsaExample().
bool ns3::WaveNetDevice::StopSch | ( | uint32_t | channelNumber | ) |
channelNumber | the channel which access resource will be released. |
Definition at line 293 of file wave-net-device.cc.
References IsAvailableChannel(), m_channelScheduler, and NS_LOG_FUNCTION.
Referenced by WaveNetDeviceExample::SendIpExample(), and WaveNetDeviceExample::SendWsaExample().
bool ns3::WaveNetDevice::StopVsa | ( | uint32_t | channelNumber | ) |
channelNumber | the channel on which VSA transmit event will be canceled. |
Definition at line 263 of file wave-net-device.cc.
References IsAvailableChannel(), m_vsaManager, and NS_LOG_FUNCTION.
Referenced by WaveNetDeviceExample::SendWsaExample().
|
virtual |
Implements ns3::NetDevice.
Definition at line 735 of file wave-net-device.cc.
|
staticprivate |
Definition at line 323 of file wave-net-device.h.
Referenced by SendX().
|
staticprivate |
Definition at line 324 of file wave-net-device.h.
Referenced by SendX().
|
private |
Definition at line 355 of file wave-net-device.h.
Referenced by ChangeAddress().
|
private |
Definition at line 352 of file wave-net-device.h.
Referenced by DoDispose(), DoInitialize(), GetChannelCoordinator(), and SetChannelCoordinator().
|
private |
Definition at line 350 of file wave-net-device.h.
Referenced by DoDispose(), DoInitialize(), GetChannelManager(), and SetChannelManager().
|
private |
Definition at line 351 of file wave-net-device.h.
Referenced by DoDispose(), DoInitialize(), GetChannelScheduler(), Send(), SendX(), SetChannelScheduler(), StartSch(), StartVsa(), and StopSch().
|
private |
Definition at line 359 of file wave-net-device.h.
Referenced by ForwardUp(), and SetReceiveCallback().
|
private |
Definition at line 361 of file wave-net-device.h.
Referenced by GetIfIndex(), and SetIfIndex().
|
private |
Definition at line 345 of file wave-net-device.h.
Referenced by AddMac(), ChangeAddress(), DoDispose(), DoInitialize(), GetMac(), GetMacs(), GetTypeId(), IsAvailableChannel(), SetAddress(), and SetPromiscReceiveCallback().
|
mutableprivate |
Definition at line 362 of file wave-net-device.h.
Definition at line 358 of file wave-net-device.h.
|
private |
Definition at line 348 of file wave-net-device.h.
Referenced by AddPhy(), DoDispose(), DoInitialize(), GetChannel(), GetPhy(), GetPhys(), GetTypeId(), RegisterTxProfile(), and SendX().
|
private |
Definition at line 360 of file wave-net-device.h.
Referenced by ForwardUp(), and SetPromiscReceiveCallback().
|
private |
Definition at line 354 of file wave-net-device.h.
Referenced by DeleteTxProfile(), DoDispose(), RegisterTxProfile(), and Send().
|
private |
Definition at line 353 of file wave-net-device.h.
Referenced by DoDispose(), DoInitialize(), GetVsaManager(), SetVsaManager(), SetWaveVsaCallback(), StartVsa(), and StopVsa().
|
staticprivate |
Definition at line 321 of file wave-net-device.h.
Referenced by GetTypeId(), and SetMtu().