Its for learning purpose.
Dear Arafat Habib
see these codes
Example Script for Simulation Configuration
1. Configuration of PHY and channel
// *************************************** PHY and Channel ***************************************** //
YansWifiPhyHelper wifiPhy = YansWifiPhyHelper::Default ();
// set it to zero; otherwise, gain will be added
wifiPhy.Set ("RxGain", DoubleValue (0));
wifiPhy.Set ("CcaMode1Threshold", DoubleValue (0.0));
// ns-3 supports RadioTap and Prism tracing extensions for 802.11b
wifiPhy.SetPcapDataLinkType (YansWifiPhyHelper::DLT_IEEE802_11_RADIO);
YansWifiChannelHelper wifiChannel;
wifiChannel.SetPropagationDelay ("ns3::ConstantSpeedPropagationDelayModel");
wifiChannel.AddPropagationLoss ("ns3::LogDistancePropagationLossModel");
wifiPhy.SetChannel (wifiChannel.Create ());
// ************************************************************************************************* //
2. Configuration of MAC
// **************************************** MAC **************************************************** //
// Add a non-QoS upper mac, and disable rate control
NqosWifiMacHelper wifiMac = NqosWifiMacHelper::Default ();
wifi.SetRemoteStationManager ("ns3::ConstantRateWifiManager",
"DataMode",StringValue (phyMode),
"ControlMode",StringValue (phyMode));
// Set it to adhoc mode
wifiMac.SetType ("ns3::AdhocWifiMac");
3. Configuration of NetDevice
// ***************************************** Net Devices ******************************************* //
NetDeviceContainer devices = wifi.Install (wifiPhy, wifiMac, c.Get (0), 5);
devices.Add (wifi.Install (wifiPhy, wifiMac, c.Get(3), 1));
// This will disable these sending devices from detecting a signal
// so that they do not backoff
wifiPhy.Set ("EnergyDetectionThreshold", DoubleValue (0.0) );
wifiPhy.Set ("TxGain", DoubleValue (offset + Prss) );
devices.Add (wifi.Install (wifiPhy, wifiMac, c.Get (1), 5));
wifiPhy.Set ("TxGain", DoubleValue (offset + Irss) );
devices.Add (wifi.Install (wifiPhy, wifiMac, c.Get (2), 1));
4. Configuration of Network Topology
// **************************************** Mobility *********************************************** //
// Note that with FixedRssLossModel, the positions below are not
// used for received signal strength.
MobilityHelper mobility;
Ptr positionAlloc = CreateObject ();
positionAlloc->Add (Vector (0.0, 0.0, 0.0));
positionAlloc->Add (Vector (distanceToRx, 0.0, 0.0));
positionAlloc->Add (Vector (0, -distanceToRx, 0.0));
positionAlloc->Add(Vector (distanceToRx, -distanceToRx, 0.0));
mobility.SetPositionAllocator (positionAlloc);
mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
mobility.Install (c);
Best Regards
Thanks a lot sir for your answer. You are so kind.
Hi you can take a look in this link good luck
http://slogix.in/cognitive-radio-networks-source-code
The packet delivery ratio is the ratio of the number of packets successfully received to the number of total packets sent. Because some packets may get lost among transmissions, what kind of...
03 April 2018 8,067 13 View
While installing NS3, at build stage I got the error given in the following image. I will be really thankful if any of you can help me with this.
10 November 2017 4,179 0 View
I believe I should cite papers that I have actually read and is relevant and related to my work.
04 May 2017 5,269 10 View
Hi there. I am a young researcher and I have few conference papers. I am currently working hard and would love to get published in IEEE Transactions. Am I dreaming big? I have read many of the...
03 April 2017 3,044 2 View
Want to know this eagerly.
01 February 2017 1,323 6 View
Hello everyone. I am quite new in research field and confused about one issue. Opinion from the experts will help me remove the confusion. I am looking for an answer whether it would be ethical to...
11 December 2016 3,779 2 View
I am quite new in this field and please pardon me if there is any conceptual mistake in the question.
10 November 2016 1,504 8 View
Especially relating computer science oriented problems.
09 October 2016 7,687 0 View
My name is Apurva Saoji. I am a Ph.D scholar in Computer engineering in India. I am looking for international expert in reviewing my PhD thesis, "Competitive Optimization Techniques to Minimize...
07 August 2024 4,600 2 View
I have tried several times to isolate lymphocytes from mouse spleen, but all attempts have been unsuccessful. I tried most available protocols. I used different dissociation media (HBSS with Ca...
04 August 2024 9,913 7 View
I've seen articles that primarily focus on alpha and beta activity in the frontal regions, but these studies often compare healthy subjects with those having various pathologies. I haven't seen a...
31 July 2024 7,259 1 View
need of sensor details or sensor development for this question.
28 July 2024 4,539 3 View
The main differences
14 July 2024 3,158 4 View
There exists a neural network model designed to predict a specific output, detailed in a published article. The model comprises 14 inputs, each normalized with minimum and maximum parameters...
14 July 2024 2,714 3 View
hello dear i need to learn this program any one know ??? i want to convert path propagation to Image reconstruction 2d how is that done ? lik this image??
14 July 2024 1,811 0 View
how to convert the area with 4 node and convert it to reconstruction image in wireless insite?like the fig
14 July 2024 4,435 0 View
Is any validated questionnaire available to measure "House money effect" bias in the financial market (Likert scale)?
11 July 2024 6,772 4 View
I would like to solve problems which are mentally challenging. How do I improve my cognitive capabilities to solve challenging problems?
03 July 2024 5,924 2 View