A Discrete-Event Network Simulator
API
Public Member Functions | Private Member Functions | Private Attributes | List of all members
WaveNetDeviceExample Class Reference

This simulation is to show the routing service of WaveNetDevice described in IEEE 09.4. More...

Public Member Functions

void SendIpExample (void)
 Send IP example function. More...
 
void SendWsaExample (void)
 Send WSA example. More...
 
void SendWsmpExample (void)
 Send WSMP example function. More...
 

Private Member Functions

void CreateWaveNodes (void)
 Create WAVE nodes function. More...
 
bool Receive (Ptr< NetDevice > dev, Ptr< const Packet > pkt, uint16_t mode, const Address &sender)
 Receive function. More...
 
bool ReceiveVsa (Ptr< const Packet > pkt, const Address &address, uint32_t, uint32_t)
 Receive VSA function. More...
 
void SendIpPacket (uint32_t seq, bool ipv6)
 Send IP packet function. More...
 
void SendOneWsmpPacket (uint32_t channel, uint32_t seq)
 Send one WSMP packet function. More...
 

Private Attributes

NetDeviceContainer devices
 the devices More...
 
NodeContainer nodes
 the nodes More...
 

Detailed Description

This simulation is to show the routing service of WaveNetDevice described in IEEE 09.4.

note: although txPowerLevel is supported now, the "TxPowerLevels" attribute of YansWifiPhy is 1 which means phy devices only support 1 levels. Thus, if users want to control txPowerLevel, they should set these attributes of YansWifiPhy by themselves..

Definition at line 40 of file wave-simple-device.cc.

Member Function Documentation

◆ CreateWaveNodes()

void WaveNetDeviceExample::CreateWaveNodes ( void  )
private

◆ Receive()

bool WaveNetDeviceExample::Receive ( Ptr< NetDevice dev,
Ptr< const Packet pkt,
uint16_t  mode,
const Address sender 
)
private

Receive function.

Parameters
devthe device
pktthe packet
modethe mode
senderthe sender address
Returns
true if successful

Definition at line 121 of file wave-simple-device.cc.

References ns3::Time::GetSeconds(), ns3::SeqTsHeader::GetSeq(), ns3::SeqTsHeader::GetTs(), ns3::Now(), and ns3::Packet::PeekHeader().

Referenced by CreateWaveNodes().

◆ ReceiveVsa()

bool WaveNetDeviceExample::ReceiveVsa ( Ptr< const Packet pkt,
const Address address,
uint32_t  ,
uint32_t   
)
private

Receive VSA function.

Parameters
pktthe packet
addressthe address
Returns
true if successful

Definition at line 239 of file wave-simple-device.cc.

References ns3::Time::GetSeconds(), and ns3::Now().

Referenced by CreateWaveNodes().

◆ SendIpExample()

void WaveNetDeviceExample::SendIpExample ( void  )

◆ SendIpPacket()

void WaveNetDeviceExample::SendIpPacket ( uint32_t  seq,
bool  ipv6 
)
private

Send IP packet function.

Parameters
seqthe sequence
ipv6true if IPV6

Definition at line 185 of file wave-simple-device.cc.

References ns3::Packet::AddHeader(), first::devices, ns3::WaveNetDevice::Send(), and ns3::SeqTsHeader::SetSeq().

Referenced by SendIpExample().

◆ SendOneWsmpPacket()

void WaveNetDeviceExample::SendOneWsmpPacket ( uint32_t  channel,
uint32_t  seq 
)
private

Send one WSMP packet function.

Parameters
channelthe channel to use
seqthe sequence

Definition at line 134 of file wave-simple-device.cc.

References ns3::Packet::AddHeader(), third::channel, first::devices, ns3::Mac48Address::GetBroadcast(), ns3::WaveNetDevice::SendX(), and ns3::SeqTsHeader::SetSeq().

Referenced by SendWsmpExample().

◆ SendWsaExample()

void WaveNetDeviceExample::SendWsaExample ( void  )

◆ SendWsmpExample()

void WaveNetDeviceExample::SendWsmpExample ( void  )

Member Data Documentation

◆ devices

NetDeviceContainer WaveNetDeviceExample::devices
private

the devices

Definition at line 85 of file wave-simple-device.cc.

◆ nodes

NodeContainer WaveNetDeviceExample::nodes
private

the nodes

Definition at line 84 of file wave-simple-device.cc.


The documentation for this class was generated from the following file: