This simulation is to show the routing service of WaveNetDevice described in IEEE 09.4. More...
Public Member Functions | |
void | SendIpExample () |
Send IP example function. | |
void | SendWsaExample () |
Send WSA example. | |
void | SendWsmpExample () |
Send WSMP example function. | |
Private Member Functions | |
void | CreateWaveNodes () |
Create WAVE nodes function. | |
bool | Receive (Ptr< NetDevice > dev, Ptr< const Packet > pkt, uint16_t mode, const Address &sender) |
Receive function. | |
bool | ReceiveVsa (Ptr< const Packet > pkt, const Address &address, uint32_t, uint32_t) |
Receive VSA function. | |
void | SendIpPacket (uint32_t seq, bool ipv6) |
Send IP packet function. | |
void | SendOneWsmpPacket (uint32_t channel, uint32_t seq) |
Send one WSMP packet function. | |
Private Attributes | |
NetDeviceContainer | devices |
the devices | |
NodeContainer | nodes |
the nodes | |
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.
|
private |
Create WAVE nodes function.
Definition at line 89 of file wave-simple-device.cc.
References ns3::YansWifiChannelHelper::Create(), ns3::NodeContainer::Create(), ns3::YansWavePhyHelper::Default(), ns3::WaveHelper::Default(), ns3::QosWaveMacHelper::Default(), ns3::YansWifiChannelHelper::Default(), devices, ns3::WifiPhyHelper::DLT_IEEE802_11, ns3::PcapHelperForDevice::EnablePcap(), ns3::NetDeviceContainer::Get(), ns3::NetDeviceContainer::GetN(), ns3::WaveHelper::Install(), ns3::MakeCallback(), nodes, Receive(), ReceiveVsa(), ns3::YansWifiPhyHelper::SetChannel(), and ns3::WifiPhyHelper::SetPcapDataLinkType().
Referenced by SendIpExample(), SendWsaExample(), and SendWsmpExample().
|
private |
Receive function.
dev | the device |
pkt | the packet |
mode | the mode |
sender | the sender address |
Definition at line 122 of file wave-simple-device.cc.
References ns3::Time::As(), ns3::SeqTsHeader::GetSeq(), ns3::SeqTsHeader::GetTs(), ns3::Now(), and ns3::Time::S.
Referenced by CreateWaveNodes().
|
private |
Receive VSA function.
pkt | the packet |
address | the address |
Definition at line 247 of file wave-simple-device.cc.
References ns3::Time::As(), ns3::Now(), and ns3::Time::S.
Referenced by CreateWaveNodes().
void WaveNetDeviceExample::SendIpExample | ( | ) |
Send IP example function.
Definition at line 208 of file wave-simple-device.cc.
References CreateWaveNodes(), ns3::WaveNetDevice::DeleteTxProfile(), ns3::Simulator::Destroy(), devices, EXTENDED_ALTERNATING, ns3::NetDeviceContainer::Get(), ns3::WaveNetDevice::RegisterTxProfile(), ns3::Simulator::Run(), SCH1, ns3::Simulator::Schedule(), ns3::Seconds(), SendIpPacket(), ns3::WaveNetDevice::StartSch(), ns3::Simulator::Stop(), and ns3::WaveNetDevice::StopSch().
|
private |
Send IP packet function.
seq | the sequence |
ipv6 | true if IPV6 |
Definition at line 191 of file wave-simple-device.cc.
References devices, ns3::NetDeviceContainer::Get(), and ns3::SeqTsHeader::SetSeq().
Referenced by SendIpExample().
Send one WSMP packet function.
channel | the channel to use |
seq | the sequence |
Definition at line 138 of file wave-simple-device.cc.
References devices, ns3::NetDeviceContainer::Get(), ns3::Mac48Address::GetBroadcast(), and ns3::SeqTsHeader::SetSeq().
Referenced by SendWsmpExample().
void WaveNetDeviceExample::SendWsaExample | ( | ) |
Send WSA example.
Definition at line 255 of file wave-simple-device.cc.
References CreateWaveNodes(), ns3::Simulator::Destroy(), devices, EXTENDED_ALTERNATING, ns3::NetDeviceContainer::Get(), ns3::Mac48Address::GetBroadcast(), ns3::Simulator::Run(), SCH1, ns3::Simulator::Schedule(), ns3::Seconds(), ns3::WaveNetDevice::StartSch(), ns3::WaveNetDevice::StartVsa(), ns3::Simulator::Stop(), ns3::WaveNetDevice::StopSch(), ns3::WaveNetDevice::StopVsa(), and ns3::VSA_TRANSMIT_IN_BOTHI.
void WaveNetDeviceExample::SendWsmpExample | ( | ) |
Send WSMP example function.
Definition at line 154 of file wave-simple-device.cc.
References CCH, CreateWaveNodes(), ns3::Simulator::Destroy(), devices, EXTENDED_ALTERNATING, ns3::NetDeviceContainer::Get(), ns3::Simulator::Run(), SCH1, SCH2, ns3::Simulator::Schedule(), ns3::Seconds(), SendOneWsmpPacket(), ns3::WaveNetDevice::StartSch(), ns3::Simulator::Stop(), and ns3::WaveNetDevice::StopSch().
|
private |
the devices
Definition at line 85 of file wave-simple-device.cc.
Referenced by CreateWaveNodes(), SendIpExample(), SendIpPacket(), SendOneWsmpPacket(), SendWsaExample(), and SendWsmpExample().
|
private |