<rss version="2.0"><channel><title>Agus Kurniawan Guestbook</title><item><title><![CDATA[Nafis Imtiaz Zaman (E-MAIL:nafis2007@hotmail.com)]]></title><link><![CDATA[http://www.aguskurniawan.net:80//Default.aspx?pg=61d964c5-ba48-4c70-9207-1677bb357e70#f4efa43b-dd75-4f37-8269-355f10d4d411]]></link><description><![CDATA[<b>1/3/2012</b><br />Dear Agus:
I am a PhD researcher and just started working with NS3.I was trying to to write my own code which I am giving below.could you pls tell me how can I do that.Thank.pls tell me the way how to implement this code.

#include "ns3/core-module.h"

#include "ns3/simulator-module.h"

#include "ns3/node-module.h"

#include "ns3/helper-module.h"

#include "ns3/wifi-module.h"

#include "ns3/mobility-module.h"

#include "ns3/ipv4-global-routing-helper.h"

#include "ns3/packet-loss-counter.h"


 


using namespace ns3;


NS_LOG_COMPONENT_DEFINE ("My Network Projects");


int 

main (int argc, char *argv[])

{

  bool verbose = true;

  

  uint32_t nWifi = 35;

  uint32_t m_packets =50;

uint32_t m_packetsize = 1024;

uint32_t port = 1254;

AsciiTraceHelper ascii;


  CommandLine cmd;

 

  cmd.AddValue ("nWifi", "Number of wifi STA devices", nWifi);

  cmd.AddValue ("verbose", "Tell echo applications to log if true", verbose);


  cmd.Parse (argc,argv);


  if (verbose)

    {

      LogComponentEnable("UdpEchoClientApplication", LOG_LEVEL_INFO);

      LogComponentEnable("UdpEchoServerApplication", LOG_LEVEL_INFO);

    }


   


   NodeContainer wifiStaNodes;

 //NodeContainer wifiApNodes;

  wifiStaNodes.Create (nWifi);

  NodeContainer wifiApNode = wifiStaNodes.Get (0);


  YansWifiChannelHelper channel = YansWifiChannelHelper::Default ();

  YansWifiPhyHelper phy = YansWifiPhyHelper::Default ();

  phy.SetChannel (channel.Create ());


  WifiHelper wifi = WifiHelper::Default ();

  wifi.SetRemoteStationManager ("ns3::AarfWifiManager");

  wifi.SetStandard(WIFI_PHY_STANDARD_80211b);

  NqosWifiMacHelper mac = NqosWifiMacHelper::Default ();


  Ssid ssid = Ssid ("ns-3-ssid");

  mac.SetType ("ns3::StaWifiMac",

               "Ssid", SsidValue (ssid),

               "ActiveProbing", BooleanValue (false));


  NetDeviceContainer staDevices;

  staDevices = wifi.Install (phy, mac, wifiStaNodes);


  mac.SetType ("ns3::ApWifiMac",

               "Ssid", SsidValue (ssid));


  NetDeviceContainer apDevices;

  apDevices = wifi.Install (phy, mac, wifiApNode);


  MobilityHelper mobility;


  mobility.SetPositionAllocator ("ns3::GridPositionAllocator",

                                 "MinX", DoubleValue (0.0),

                                 "MinY", DoubleValue (0.0),

                                 "DeltaX", DoubleValue (5.0),

                                 "DeltaY", DoubleValue (100.0),

                                 "GridWidth", UintegerValue (3),

                                 "LayoutType", StringValue ("RowFirst"));


 

mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");

mobility.Install (wifiStaNodes);

mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");

mobility.Install (wifiApNode);


  InternetStackHelper stack;

  

  stack.Install (wifiStaNodes);


  Ipv4AddressHelper address;

 

 

  address.SetBase ("10.1.1.0", "255.255.255.0");

   Ipv4InterfaceContainer wifiInterfaces, wifiApInterface;

   

 //  wifiApInterface=address.Assign (apDevices);

   wifiInterfaces= address.Assign (staDevices);

  UdpEchoServerHelper echoServer (port);


  ApplicationContainer serverApps = echoServer.Install (wifiApNode);

  serverApps.Start (Seconds (1.0));

  serverApps.Stop (Seconds (10.0));


  UdpEchoClientHelper echoClient (wifiInterfaces.GetAddress (0), port);

  echoClient.SetAttribute ("MaxPackets", UintegerValue (m_packets));

  echoClient.SetAttribute ("Interval", TimeValue (Seconds (1.0)));

  echoClient.SetAttribute ("PacketSize", UintegerValue (m_packetsize));


  ApplicationContainer clientApps = echoClient.Install (wifiStaNodes.Get (nWifi - 1));

  clientApps.Start (Seconds (2.0));

  clientApps.Stop (Seconds (10.0));


  Ipv4GlobalRoutingHelper::PopulateRoutingTables ();


  Simulator::Stop (Seconds (10.0));


  //pointToPoint.EnablePcapAll ("third");

  phy.EnablePcap ("scratch/Server", apDevices.Get (0));

  phy.EnablePcap ("scratch/Client", staDevices.Get (nWifi-1));

  phy.EnableAscii (ascii.CreateFileStream ("scratch/Server.tr"),apDevices.Get(0));

  phy.EnableAscii (ascii.CreateFileStream ("scratch/Client.tr"),staDevices.Get(nWifi-1));

  //helper.EnableAscii (stream, nd1);


  //csma.EnablePcap ("third", csmaDevices.Get (0), true);


  Simulator::Run ();

  Simulator::Destroy ();

  return 0;

}]]></description></item><item><title><![CDATA[MOHAMED]]></title><link><![CDATA[http://www.aguskurniawan.net:80//Default.aspx?pg=61d964c5-ba48-4c70-9207-1677bb357e70#17c0098d-175e-47f7-b8b2-d2d2e987f0e7]]></link><description><![CDATA[<b>5/16/2011</b><br />Bonjour,
   Merci pour le tutoriel, mais j'ai un probleme car j'ai suivi toute le tutoriel pour configurer openCV dans visuel C++  (visual studio 2010). avec windows 7 comme system d'eploitation, j'ai toujours des erreure. pouriez vous m'aider??

med32_9@hotmail.com]]></description></item><item><title><![CDATA[manny]]></title><link><![CDATA[http://www.aguskurniawan.net:80//Default.aspx?pg=61d964c5-ba48-4c70-9207-1677bb357e70#5bb4d1dc-bb7d-4d54-b202-d2f50588915b]]></link><description><![CDATA[<b>3/26/2011</b><br />sir
i am b.s. computers
and want a module to integrate in eye glasses website.
i.e.
virtual tryon 
using opencv eye detection.
If you can do the project , pl email
mangat1954@gmail.com
thanks]]></description></item><item><title><![CDATA[Nia]]></title><link><![CDATA[http://www.aguskurniawan.net:80//Default.aspx?pg=61d964c5-ba48-4c70-9207-1677bb357e70#6299ba32-b804-411e-8d3e-fe30c757131b]]></link><description><![CDATA[<b>12/24/2010</b><br />Assalamu'alaikum mas Agus...

Perkenalkan, sy Nia. Sy lg kuliah di USU, Medan. Sy mau nanya2 seputar NS3 boleh? Kebetulan sy mau buat program memakai NS3. Ns3 sgt beda dgn NS2. Sy msh bingung dgn cara mengcompilenya & mengeluarkan outputnya di NAM. 
Stlh kita buat source program di C++, lalu gmn cara ngompilenya & lht hasilnya di NAM?

Makasih byk sblmnya...

Wassalamu'alaikum, Nia.]]></description></item></channel></rss>
