--
Posting to this group should follow these guidelines https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
---
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ns-3-users+unsubscribe@googlegroups.com.
To post to this group, send email to ns-3-...@googlegroups.com.
Visit this group at https://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to a topic in the Google Groups "ns-3-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ns-3-users/XQv5MgZCoRc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ns-3-users+unsubscribe@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to ns-3-users+...@googlegroups.com.
To post to this group, send email to ns-3-...@googlegroups.com.
Visit this group at https://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.
--
Posting to this group should follow these guidelines https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
---
You received this message because you are subscribed to a topic in the Google Groups "ns-3-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ns-3-users/XQv5MgZCoRc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ns-3-users+...@googlegroups.com.
To post to this group, send email to ns-3-...@googlegroups.com.
Visit this group at https://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.
--
Posting to this group should follow these guidelines https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
---
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ns-3-users+...@googlegroups.com.
To post to this group, send email to ns-3-...@googlegroups.com.
Visit this group at https://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.
--
Posting to this group should follow these guidelines https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
---
You received this message because you are subscribed to a topic in the Google Groups "ns-3-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ns-3-users/XQv5MgZCoRc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ns-3-users+...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to ns-3-users+unsubscribe@googlegroups.com.
Ptr<ParabolicAntennaModel> parabolicAntenna = CreateObject<ParabolicAntennaModel>();
parabolicAntenna->SetBeamwidth(60);
parabolicAntenna->SetOrientation(120);
de_wireless.Get(0)->GetObject<WifiNetDevice>()->GetPhy()->SetAntenna(parabolicAntenna);error: ‘class ns3::WifiPhy’ has no member named ‘SetAntenna’Thanks for your kind response, Rediet. I successfully rectified it.Now the real issue is this:What I want to realise is all wireless nodes should have 4 antennas each (each covering 90 degrees to cover the whole 360 degrees). I have successfully installed parabolic antenna on all the wireless nodes. Then, CSMA node will send TCP traffic to each antenna of every wireless node. I need to show that the antennas facing away from the CSMA node receive less traffic. How do I go about doing this ?
There aren't much options to configure in ParabolicAntenna class. Kindly let me know.Thanks,
Mahesh
On Thursday, 3 August 2017 12:35:41 UTC+5:30, Rediet wrote:Hello,A quick reply concerning the GetPhy part: it is normal that it returns a pointer to WifiPhy (that's the class WifiNetDevice know about). You have to (dynamic) cast it to SpectrumWifiPhy pointer to set antenna.Rediet
Le jeudi 3 août 2017 08:04:05 UTC+2, Mahesh a écrit :Hi,When I use the "CalculateSnr" function defined in interference-helper.cc, how do I get the signal and noise interference values to feed into the function ?
I am using the spectrum channel in my code.Now, my query is as follows:I am setting the parabolic antenna values by doingPtr<ParabolicAntennaModel> parabolicAntenna = CreateObject<ParabolicAntennaModel>();
parabolicAntenna->SetBeamwidth(60);
parabolicAntenna->SetOrientation(120);When I do the followingde_wireless.Get(0)->GetObject<WifiNetDevice>()->GetPhy()->SetAntenna(parabolicAntenna);
I am gettingerror: ‘class ns3::WifiPhy’ has no member named ‘SetAntenna’
GetPhy() should return a reference to class ns3::SpectrumWifiPhy and not class ns3::WifiPhy. Why the error then ?Also, both SpectrumWifiPhy and SpectrumWifiPhyHelper have SetChannel functions. With which instance should I set the channel ?
Thanks for your detailed reply, Rediet. Much appreciated.So I added MultiModelSpectrumChannel to my code and it worked fine. I hope I don't have to use SpectrumSignalParameters's txAntenna attribute etc. explicitly, hope it's handled internally when I have the MultiModelSpectrumChannel.
A question that comes up then is when I have configured ParabolicAntenna on all the wireless nodes (although only a single antenna) in my previous code, why isn't there any difference in throughput values when I change the Beamwidth and Orientation ?
Secondly, if I am defining a new antenna model (just like Parabolic), then do I create 4 (say) different functions like GetGainDb depending on the orientation I want. Is that enough to handle the complexity of having multiple antennas mounted on a single node ?
Also, how would I distinguish a flow at an antenna level instead of a node level. For example, a node can have multiple interfaces, so how can I associate different antennas to a single node and get statistics for each antenna ?
double phi = a.phi - m_orientationRadiansdouble phi = a.phi - m_orientationRadians1 - m_orientationRadians2;Ptr<MyAntennaModel> am1 = CreateObject<MyAntennaModel> ();
Ptr<MyAntennaModel> am2 = CreateObject<MyAntennaModel> ();
//double actualGain1 = am1->GetGainDb (DtoC);
//double actualGain2 = am2->GetGainDb (CtoD);
Kindly clarify this.
For more options, visit <a href="https:
double phi1 = a.phi - m_orientationRadians1;
double phi2 = a.phi - m_orientationRadians2;
double gainDb1 = -std::min (12 * pow (phi1 / m_beamwidthRadians, 2), m_maxAttenuation);
double gainDb2 = -std::min (12 * pow (phi2 / m_beamwidthRadians, 2), m_maxAttenuation);
double gainDb = gainDb1 + gainDb2;double gainDb1 = 20 * std::log10 (ef1);
double gainDb2 = 20 * std::log10 (ef2);
double gainDb3 = 20 * std::log10 (ef3);
double gainDb4 = 20 * std::log10 (ef4);double gainDb = gainDb1 + gainDb2 + gainDb3 + gainDb4 + m_maxGain1 + m_maxGain2 + m_maxGain3 + m_maxGain4;phyHelper.Set ("ChannelNumber", UintegerValue (42));
phyHelper.Antenna1 ("ns3::MyCosineAntennaModel", "Beamwidth1", DoubleValue (bw1), "Orientation1", DoubleValue (or01), "MaxGain1", DoubleValue (mg1));
de_wireless1.Add (wifi.Install (phyHelper, wifiMac, nc_wireless.Get (0)));
de_wireless1.Add (wifi.Install (phyHelper, wifiMac, nc_wireless.Get (4)));
phyHelper.Set ("ChannelNumber", UintegerValue (58));
phyHelper.Antenna2 ("ns3::MyCosineAntennaModel", "Beamwidth2", DoubleValue (bw2), "Orientation2", DoubleValue (or02), "MaxGain2", DoubleValue (mg2));
de_wireless2.Add (wifi.Install (phyHelper, wifiMac, nc_wireless.Get (1)));
de_wireless2.Add (wifi.Install (phyHelper, wifiMac, nc_wireless.Get (5)));