samples/main-adhoc-wifi.cc
author Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
Thu, 29 Nov 2007 15:50:15 +0100
changeset 2169 06af4e3c25a2
parent 2159 20f882e85b4a
child 2230 9f13ac3291e0
permissions -rw-r--r--
ConnectTo -> Attach
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1884
6056f112404c build wifi sample code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     1
/* -*-  Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
6056f112404c build wifi sample code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     2
/*
6056f112404c build wifi sample code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     3
 * Copyright (c) 2005,2006,2007 INRIA
6056f112404c build wifi sample code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     4
 *
6056f112404c build wifi sample code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     5
 * This program is free software; you can redistribute it and/or modify
6056f112404c build wifi sample code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     6
 * it under the terms of the GNU General Public License version 2 as
6056f112404c build wifi sample code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     7
 * published by the Free Software Foundation;
6056f112404c build wifi sample code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     8
 *
6056f112404c build wifi sample code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     9
 * This program is distributed in the hope that it will be useful,
6056f112404c build wifi sample code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
6056f112404c build wifi sample code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
6056f112404c build wifi sample code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    12
 * GNU General Public License for more details.
6056f112404c build wifi sample code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    13
 *
6056f112404c build wifi sample code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    14
 * You should have received a copy of the GNU General Public License
6056f112404c build wifi sample code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    15
 * along with this program; if not, write to the Free Software
6056f112404c build wifi sample code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    16
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
6056f112404c build wifi sample code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    17
 *
6056f112404c build wifi sample code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    18
 * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
6056f112404c build wifi sample code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    19
 */
6056f112404c build wifi sample code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    20
6056f112404c build wifi sample code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    21
#include "ns3/wifi-net-device.h"
6056f112404c build wifi sample code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    22
#include "ns3/wifi-channel.h"
6056f112404c build wifi sample code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    23
#include "ns3/simulator.h"
6056f112404c build wifi sample code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    24
#include "ns3/callback.h"
6056f112404c build wifi sample code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    25
#include "ns3/ptr.h"
6056f112404c build wifi sample code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    26
#include "ns3/node.h"
6056f112404c build wifi sample code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    27
#include "ns3/onoff-application.h"
6056f112404c build wifi sample code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    28
#include "ns3/static-mobility-model.h"
6056f112404c build wifi sample code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    29
#include "ns3/random-variable.h"
2152
5c6c0f580aca use packet sockets and generate all graphics
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2149
diff changeset
    30
#include "ns3/packet-socket-address.h"
2019
eee1c9d3811f enable packet metadata for debugging
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1973
diff changeset
    31
#include "ns3/packet.h"
2068
af5f03746dbe add throughput printer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2019
diff changeset
    32
#include "ns3/socket.h"
af5f03746dbe add throughput printer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2019
diff changeset
    33
#include "ns3/socket-factory.h"
2079
673a34d2e3d7 use the gnuplot machinery to output a set of plots
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2075
diff changeset
    34
#include "ns3/command-line.h"
673a34d2e3d7 use the gnuplot machinery to output a set of plots
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2075
diff changeset
    35
#include "ns3/gnuplot.h"
1884
6056f112404c build wifi sample code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    36
6056f112404c build wifi sample code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    37
6056f112404c build wifi sample code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    38
#include <iostream>
6056f112404c build wifi sample code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    39
6056f112404c build wifi sample code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    40
using namespace ns3;
2068
af5f03746dbe add throughput printer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2019
diff changeset
    41
static uint32_t g_bytesTotal = 0;
2079
673a34d2e3d7 use the gnuplot machinery to output a set of plots
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2075
diff changeset
    42
static GnuplotDataset *g_output = 0;
1884
6056f112404c build wifi sample code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    43
6056f112404c build wifi sample code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    44
static Ptr<Node>
1964
041240a915f8 build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1955
diff changeset
    45
CreateAdhocNode (Ptr<WifiChannel> channel,
2115
4be7e10e471e merge with Position -> Vector rename
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2084
diff changeset
    46
                 Vector position, const char *address)
1884
6056f112404c build wifi sample code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    47
{
2152
5c6c0f580aca use packet sockets and generate all graphics
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2149
diff changeset
    48
  Ptr<Node> node = Create<Node> ();  
5c6c0f580aca use packet sockets and generate all graphics
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2149
diff changeset
    49
  Ptr<AdhocWifiNetDevice> device = Create<AdhocWifiNetDevice> (node, Mac48Address (address));
2169
06af4e3c25a2 ConnectTo -> Attach
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2159
diff changeset
    50
  device->Attach (channel);
1884
6056f112404c build wifi sample code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    51
  Ptr<MobilityModel> mobility = Create<StaticMobilityModel> ();
2115
4be7e10e471e merge with Position -> Vector rename
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2084
diff changeset
    52
  mobility->SetPosition (position);
1884
6056f112404c build wifi sample code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    53
  node->AddInterface (mobility);
6056f112404c build wifi sample code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    54
  
6056f112404c build wifi sample code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    55
  return node;
6056f112404c build wifi sample code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    56
}
6056f112404c build wifi sample code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    57
6056f112404c build wifi sample code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    58
static void
2115
4be7e10e471e merge with Position -> Vector rename
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2084
diff changeset
    59
SetPosition (Ptr<Node> node, Vector position)
1884
6056f112404c build wifi sample code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    60
{
6056f112404c build wifi sample code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    61
  Ptr<MobilityModel> mobility = node->QueryInterface<MobilityModel> (MobilityModel::iid);
2115
4be7e10e471e merge with Position -> Vector rename
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2084
diff changeset
    62
  mobility->SetPosition (position);
1884
6056f112404c build wifi sample code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    63
}
6056f112404c build wifi sample code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    64
2115
4be7e10e471e merge with Position -> Vector rename
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2084
diff changeset
    65
static Vector
1884
6056f112404c build wifi sample code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    66
GetPosition (Ptr<Node> node)
6056f112404c build wifi sample code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    67
{
6056f112404c build wifi sample code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    68
  Ptr<MobilityModel> mobility = node->QueryInterface<MobilityModel> (MobilityModel::iid);
2115
4be7e10e471e merge with Position -> Vector rename
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2084
diff changeset
    69
  return mobility->GetPosition ();
1884
6056f112404c build wifi sample code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    70
}
6056f112404c build wifi sample code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    71
6056f112404c build wifi sample code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    72
static void 
6056f112404c build wifi sample code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    73
AdvancePosition (Ptr<Node> node) 
6056f112404c build wifi sample code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    74
{
2115
4be7e10e471e merge with Position -> Vector rename
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2084
diff changeset
    75
  Vector pos = GetPosition (node);
2075
ae2cdfcd0368 print the throughput vs distance curve
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2068
diff changeset
    76
  double mbs = ((g_bytesTotal * 8.0) / 1000000);
ae2cdfcd0368 print the throughput vs distance curve
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2068
diff changeset
    77
  g_bytesTotal = 0;
2079
673a34d2e3d7 use the gnuplot machinery to output a set of plots
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2075
diff changeset
    78
  g_output->Add (pos.x, mbs);
2082
d041fc198aad a real test
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2081
diff changeset
    79
  pos.x += 1.0;
2079
673a34d2e3d7 use the gnuplot machinery to output a set of plots
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2075
diff changeset
    80
  if (pos.x >= 210.0) 
673a34d2e3d7 use the gnuplot machinery to output a set of plots
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2075
diff changeset
    81
    {
673a34d2e3d7 use the gnuplot machinery to output a set of plots
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2075
diff changeset
    82
      return;
673a34d2e3d7 use the gnuplot machinery to output a set of plots
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2075
diff changeset
    83
    }
1884
6056f112404c build wifi sample code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    84
  SetPosition (node, pos);
1971
2f9ca80a8d74 fix position printing code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1964
diff changeset
    85
  //std::cout << "x="<<pos.x << std::endl;
1884
6056f112404c build wifi sample code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    86
  Simulator::Schedule (Seconds (1.0), &AdvancePosition, node);
6056f112404c build wifi sample code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    87
}
6056f112404c build wifi sample code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    88
2068
af5f03746dbe add throughput printer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2019
diff changeset
    89
static void
2159
20f882e85b4a port to Ptr<Packet> branch
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2152
diff changeset
    90
ReceivePacket (Ptr<Socket> socket, Ptr<Packet> packet, const Address &address)
2068
af5f03746dbe add throughput printer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2019
diff changeset
    91
{
2159
20f882e85b4a port to Ptr<Packet> branch
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2152
diff changeset
    92
  g_bytesTotal += packet->GetSize ();
2068
af5f03746dbe add throughput printer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2019
diff changeset
    93
}
1884
6056f112404c build wifi sample code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    94
2068
af5f03746dbe add throughput printer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2019
diff changeset
    95
static Ptr<Socket>
2152
5c6c0f580aca use packet sockets and generate all graphics
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2149
diff changeset
    96
SetupPacketReceive (Ptr<Node> node, uint16_t port)
2068
af5f03746dbe add throughput printer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2019
diff changeset
    97
{
2152
5c6c0f580aca use packet sockets and generate all graphics
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2149
diff changeset
    98
  InterfaceId iid = InterfaceId::LookupByName ("Packet");
2068
af5f03746dbe add throughput printer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2019
diff changeset
    99
  Ptr<SocketFactory> socketFactory = node->QueryInterface<SocketFactory> (iid);
af5f03746dbe add throughput printer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2019
diff changeset
   100
  Ptr<Socket> sink = socketFactory->CreateSocket ();
2152
5c6c0f580aca use packet sockets and generate all graphics
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2149
diff changeset
   101
  sink->Bind ();
2068
af5f03746dbe add throughput printer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2019
diff changeset
   102
  sink->SetRecvCallback (MakeCallback (&ReceivePacket));
af5f03746dbe add throughput printer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2019
diff changeset
   103
  return sink;
af5f03746dbe add throughput printer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2019
diff changeset
   104
}
1884
6056f112404c build wifi sample code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   105
2079
673a34d2e3d7 use the gnuplot machinery to output a set of plots
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2075
diff changeset
   106
static void
673a34d2e3d7 use the gnuplot machinery to output a set of plots
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2075
diff changeset
   107
RunOneExperiment (void)
1884
6056f112404c build wifi sample code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   108
{
2149
6bf08d8a8eff plot the goodput for each data rate separately
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2115
diff changeset
   109
  g_bytesTotal = 0;
6bf08d8a8eff plot the goodput for each data rate separately
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2115
diff changeset
   110
1884
6056f112404c build wifi sample code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   111
  Ptr<WifiChannel> channel = Create<WifiChannel> ();
6056f112404c build wifi sample code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   112
1964
041240a915f8 build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1955
diff changeset
   113
  Ptr<Node> a = CreateAdhocNode (channel, 
2115
4be7e10e471e merge with Position -> Vector rename
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2084
diff changeset
   114
                                 Vector (5.0,0.0,0.0),
2152
5c6c0f580aca use packet sockets and generate all graphics
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2149
diff changeset
   115
                                 "00:00:00:00:00:01");
1964
041240a915f8 build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1955
diff changeset
   116
  Ptr<Node> b = CreateAdhocNode (channel,
2115
4be7e10e471e merge with Position -> Vector rename
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2084
diff changeset
   117
                                 Vector (0.0, 0.0, 0.0),
2152
5c6c0f580aca use packet sockets and generate all graphics
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2149
diff changeset
   118
                                 "00:00:00:00:00:02");
1884
6056f112404c build wifi sample code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   119
2152
5c6c0f580aca use packet sockets and generate all graphics
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2149
diff changeset
   120
  PacketSocketAddress destination = PacketSocketAddress ();
5c6c0f580aca use packet sockets and generate all graphics
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2149
diff changeset
   121
  destination.SetProtocol (1);
5c6c0f580aca use packet sockets and generate all graphics
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2149
diff changeset
   122
  destination.SetSingleDevice (0);
5c6c0f580aca use packet sockets and generate all graphics
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2149
diff changeset
   123
  destination.SetPhysicalAddress (Mac48Address ("00:00:00:00:00:02"));
5c6c0f580aca use packet sockets and generate all graphics
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2149
diff changeset
   124
  Ptr<Application> app = Create<OnOffApplication> (a, destination, 
5c6c0f580aca use packet sockets and generate all graphics
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2149
diff changeset
   125
                                                   "Packet", 
2079
673a34d2e3d7 use the gnuplot machinery to output a set of plots
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2075
diff changeset
   126
                                                   ConstantVariable (250),
2068
af5f03746dbe add throughput printer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2019
diff changeset
   127
                                                   ConstantVariable (0),
af5f03746dbe add throughput printer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2019
diff changeset
   128
                                                   DataRate (60000000),
2075
ae2cdfcd0368 print the throughput vs distance curve
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2068
diff changeset
   129
                                                   2000);
2068
af5f03746dbe add throughput printer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2019
diff changeset
   130
1884
6056f112404c build wifi sample code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   131
  app->Start (Seconds (0.5));
2079
673a34d2e3d7 use the gnuplot machinery to output a set of plots
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2075
diff changeset
   132
  app->Stop (Seconds (250.0));
1884
6056f112404c build wifi sample code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   133
2075
ae2cdfcd0368 print the throughput vs distance curve
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2068
diff changeset
   134
  Simulator::Schedule (Seconds (1.5), &AdvancePosition, b);
2152
5c6c0f580aca use packet sockets and generate all graphics
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2149
diff changeset
   135
  Ptr<Socket> recvSink = SetupPacketReceive (b, 10);
1973
96673851351e configure correctly the ipv4 layer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1971
diff changeset
   136
1884
6056f112404c build wifi sample code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   137
  Simulator::Run ();
6056f112404c build wifi sample code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   138
6056f112404c build wifi sample code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   139
  Simulator::Destroy ();
2079
673a34d2e3d7 use the gnuplot machinery to output a set of plots
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2075
diff changeset
   140
}
673a34d2e3d7 use the gnuplot machinery to output a set of plots
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2075
diff changeset
   141
673a34d2e3d7 use the gnuplot machinery to output a set of plots
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2075
diff changeset
   142
int main (int argc, char *argv[])
673a34d2e3d7 use the gnuplot machinery to output a set of plots
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2075
diff changeset
   143
{
673a34d2e3d7 use the gnuplot machinery to output a set of plots
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2075
diff changeset
   144
  Simulator::SetLinkedList ();
673a34d2e3d7 use the gnuplot machinery to output a set of plots
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2075
diff changeset
   145
673a34d2e3d7 use the gnuplot machinery to output a set of plots
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2075
diff changeset
   146
  // disable fragmentation
673a34d2e3d7 use the gnuplot machinery to output a set of plots
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2075
diff changeset
   147
  DefaultValue::Bind ("WifiFragmentationThreshold", "2200");
673a34d2e3d7 use the gnuplot machinery to output a set of plots
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2075
diff changeset
   148
  CommandLine::Parse (argc, argv);
673a34d2e3d7 use the gnuplot machinery to output a set of plots
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2075
diff changeset
   149
2152
5c6c0f580aca use packet sockets and generate all graphics
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2149
diff changeset
   150
  Gnuplot gnuplot = Gnuplot ("reference-rates.png");
2079
673a34d2e3d7 use the gnuplot machinery to output a set of plots
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2075
diff changeset
   151
2149
6bf08d8a8eff plot the goodput for each data rate separately
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2115
diff changeset
   152
  DefaultValue::Bind ("WifiRtsCtsThreshold", "2200");
6bf08d8a8eff plot the goodput for each data rate separately
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2115
diff changeset
   153
6bf08d8a8eff plot the goodput for each data rate separately
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2115
diff changeset
   154
  g_output = new GnuplotDataset ("54mb");
6bf08d8a8eff plot the goodput for each data rate separately
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2115
diff changeset
   155
  g_output->SetStyle (GnuplotDataset::LINES);
6bf08d8a8eff plot the goodput for each data rate separately
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2115
diff changeset
   156
  DefaultValue::Bind ("WifiRateControlAlgorithm", "ConstantRate");
6bf08d8a8eff plot the goodput for each data rate separately
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2115
diff changeset
   157
  DefaultValue::Bind ("WifiConstantDataRate", "54mb");
6bf08d8a8eff plot the goodput for each data rate separately
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2115
diff changeset
   158
  RunOneExperiment ();
6bf08d8a8eff plot the goodput for each data rate separately
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2115
diff changeset
   159
  gnuplot.AddDataset (*g_output);
6bf08d8a8eff plot the goodput for each data rate separately
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2115
diff changeset
   160
  delete g_output;
6bf08d8a8eff plot the goodput for each data rate separately
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2115
diff changeset
   161
6bf08d8a8eff plot the goodput for each data rate separately
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2115
diff changeset
   162
  g_output = new GnuplotDataset ("48mb");
6bf08d8a8eff plot the goodput for each data rate separately
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2115
diff changeset
   163
  g_output->SetStyle (GnuplotDataset::LINES);
6bf08d8a8eff plot the goodput for each data rate separately
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2115
diff changeset
   164
  DefaultValue::Bind ("WifiRateControlAlgorithm", "ConstantRate");
6bf08d8a8eff plot the goodput for each data rate separately
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2115
diff changeset
   165
  DefaultValue::Bind ("WifiConstantDataRate", "48mb");
6bf08d8a8eff plot the goodput for each data rate separately
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2115
diff changeset
   166
  RunOneExperiment ();
6bf08d8a8eff plot the goodput for each data rate separately
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2115
diff changeset
   167
  gnuplot.AddDataset (*g_output);
6bf08d8a8eff plot the goodput for each data rate separately
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2115
diff changeset
   168
  delete g_output;
6bf08d8a8eff plot the goodput for each data rate separately
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2115
diff changeset
   169
6bf08d8a8eff plot the goodput for each data rate separately
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2115
diff changeset
   170
  g_output = new GnuplotDataset ("36mb");
6bf08d8a8eff plot the goodput for each data rate separately
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2115
diff changeset
   171
  g_output->SetStyle (GnuplotDataset::LINES);
6bf08d8a8eff plot the goodput for each data rate separately
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2115
diff changeset
   172
  DefaultValue::Bind ("WifiRateControlAlgorithm", "ConstantRate");
6bf08d8a8eff plot the goodput for each data rate separately
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2115
diff changeset
   173
  DefaultValue::Bind ("WifiConstantDataRate", "36mb");
6bf08d8a8eff plot the goodput for each data rate separately
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2115
diff changeset
   174
  RunOneExperiment ();
6bf08d8a8eff plot the goodput for each data rate separately
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2115
diff changeset
   175
  gnuplot.AddDataset (*g_output);
6bf08d8a8eff plot the goodput for each data rate separately
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2115
diff changeset
   176
  delete g_output;
6bf08d8a8eff plot the goodput for each data rate separately
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2115
diff changeset
   177
6bf08d8a8eff plot the goodput for each data rate separately
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2115
diff changeset
   178
  g_output = new GnuplotDataset ("24mb");
6bf08d8a8eff plot the goodput for each data rate separately
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2115
diff changeset
   179
  g_output->SetStyle (GnuplotDataset::LINES);
6bf08d8a8eff plot the goodput for each data rate separately
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2115
diff changeset
   180
  DefaultValue::Bind ("WifiRateControlAlgorithm", "ConstantRate");
6bf08d8a8eff plot the goodput for each data rate separately
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2115
diff changeset
   181
  DefaultValue::Bind ("WifiConstantDataRate", "24mb");
6bf08d8a8eff plot the goodput for each data rate separately
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2115
diff changeset
   182
  RunOneExperiment ();
6bf08d8a8eff plot the goodput for each data rate separately
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2115
diff changeset
   183
  gnuplot.AddDataset (*g_output);
6bf08d8a8eff plot the goodput for each data rate separately
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2115
diff changeset
   184
  delete g_output;
6bf08d8a8eff plot the goodput for each data rate separately
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2115
diff changeset
   185
6bf08d8a8eff plot the goodput for each data rate separately
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2115
diff changeset
   186
  g_output = new GnuplotDataset ("18mb");
6bf08d8a8eff plot the goodput for each data rate separately
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2115
diff changeset
   187
  g_output->SetStyle (GnuplotDataset::LINES);
6bf08d8a8eff plot the goodput for each data rate separately
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2115
diff changeset
   188
  DefaultValue::Bind ("WifiRateControlAlgorithm", "ConstantRate");
6bf08d8a8eff plot the goodput for each data rate separately
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2115
diff changeset
   189
  DefaultValue::Bind ("WifiConstantDataRate", "18mb");
6bf08d8a8eff plot the goodput for each data rate separately
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2115
diff changeset
   190
  RunOneExperiment ();
6bf08d8a8eff plot the goodput for each data rate separately
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2115
diff changeset
   191
  gnuplot.AddDataset (*g_output);
6bf08d8a8eff plot the goodput for each data rate separately
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2115
diff changeset
   192
  delete g_output;
6bf08d8a8eff plot the goodput for each data rate separately
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2115
diff changeset
   193
6bf08d8a8eff plot the goodput for each data rate separately
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2115
diff changeset
   194
  g_output = new GnuplotDataset ("12mb");
6bf08d8a8eff plot the goodput for each data rate separately
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2115
diff changeset
   195
  g_output->SetStyle (GnuplotDataset::LINES);
6bf08d8a8eff plot the goodput for each data rate separately
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2115
diff changeset
   196
  DefaultValue::Bind ("WifiRateControlAlgorithm", "ConstantRate");
6bf08d8a8eff plot the goodput for each data rate separately
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2115
diff changeset
   197
  DefaultValue::Bind ("WifiConstantDataRate", "12mb");
6bf08d8a8eff plot the goodput for each data rate separately
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2115
diff changeset
   198
  RunOneExperiment ();
6bf08d8a8eff plot the goodput for each data rate separately
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2115
diff changeset
   199
  gnuplot.AddDataset (*g_output);
6bf08d8a8eff plot the goodput for each data rate separately
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2115
diff changeset
   200
  delete g_output;
6bf08d8a8eff plot the goodput for each data rate separately
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2115
diff changeset
   201
6bf08d8a8eff plot the goodput for each data rate separately
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2115
diff changeset
   202
  g_output = new GnuplotDataset ("9mb");
6bf08d8a8eff plot the goodput for each data rate separately
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2115
diff changeset
   203
  g_output->SetStyle (GnuplotDataset::LINES);
6bf08d8a8eff plot the goodput for each data rate separately
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2115
diff changeset
   204
  DefaultValue::Bind ("WifiRateControlAlgorithm", "ConstantRate");
6bf08d8a8eff plot the goodput for each data rate separately
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2115
diff changeset
   205
  DefaultValue::Bind ("WifiConstantDataRate", "9mb");
6bf08d8a8eff plot the goodput for each data rate separately
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2115
diff changeset
   206
  RunOneExperiment ();
6bf08d8a8eff plot the goodput for each data rate separately
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2115
diff changeset
   207
  gnuplot.AddDataset (*g_output);
6bf08d8a8eff plot the goodput for each data rate separately
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2115
diff changeset
   208
  delete g_output;
6bf08d8a8eff plot the goodput for each data rate separately
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2115
diff changeset
   209
6bf08d8a8eff plot the goodput for each data rate separately
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2115
diff changeset
   210
  g_output = new GnuplotDataset ("6mb");
6bf08d8a8eff plot the goodput for each data rate separately
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2115
diff changeset
   211
  g_output->SetStyle (GnuplotDataset::LINES);
6bf08d8a8eff plot the goodput for each data rate separately
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2115
diff changeset
   212
  DefaultValue::Bind ("WifiRateControlAlgorithm", "ConstantRate");
6bf08d8a8eff plot the goodput for each data rate separately
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2115
diff changeset
   213
  DefaultValue::Bind ("WifiConstantDataRate", "6mb");
6bf08d8a8eff plot the goodput for each data rate separately
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2115
diff changeset
   214
  RunOneExperiment ();
6bf08d8a8eff plot the goodput for each data rate separately
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2115
diff changeset
   215
  gnuplot.AddDataset (*g_output);
6bf08d8a8eff plot the goodput for each data rate separately
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2115
diff changeset
   216
  delete g_output;
6bf08d8a8eff plot the goodput for each data rate separately
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2115
diff changeset
   217
2152
5c6c0f580aca use packet sockets and generate all graphics
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2149
diff changeset
   218
  gnuplot.GenerateOutput (std::cout);
5c6c0f580aca use packet sockets and generate all graphics
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2149
diff changeset
   219
5c6c0f580aca use packet sockets and generate all graphics
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2149
diff changeset
   220
  gnuplot = Gnuplot ("rate-control.png");
2149
6bf08d8a8eff plot the goodput for each data rate separately
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2115
diff changeset
   221
6bf08d8a8eff plot the goodput for each data rate separately
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2115
diff changeset
   222
  DefaultValue::Bind ("WifiPhyStandard", "holland");
6bf08d8a8eff plot the goodput for each data rate separately
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2115
diff changeset
   223
6bf08d8a8eff plot the goodput for each data rate separately
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2115
diff changeset
   224
  g_output = new GnuplotDataset ("arf");
6bf08d8a8eff plot the goodput for each data rate separately
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2115
diff changeset
   225
  g_output->SetStyle (GnuplotDataset::LINES);
6bf08d8a8eff plot the goodput for each data rate separately
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2115
diff changeset
   226
  DefaultValue::Bind ("WifiRtsCtsThreshold", "2200");
6bf08d8a8eff plot the goodput for each data rate separately
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2115
diff changeset
   227
  DefaultValue::Bind ("WifiRateControlAlgorithm", "Arf");
6bf08d8a8eff plot the goodput for each data rate separately
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2115
diff changeset
   228
  RunOneExperiment ();
6bf08d8a8eff plot the goodput for each data rate separately
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2115
diff changeset
   229
  gnuplot.AddDataset (*g_output);
6bf08d8a8eff plot the goodput for each data rate separately
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2115
diff changeset
   230
  delete g_output;
6bf08d8a8eff plot the goodput for each data rate separately
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2115
diff changeset
   231
2079
673a34d2e3d7 use the gnuplot machinery to output a set of plots
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2075
diff changeset
   232
  g_output = new GnuplotDataset ("aarf");
2081
434742b27b1e use the new style support
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2079
diff changeset
   233
  g_output->SetStyle (GnuplotDataset::LINES);
2082
d041fc198aad a real test
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2081
diff changeset
   234
  DefaultValue::Bind ("WifiRtsCtsThreshold", "2200");
d041fc198aad a real test
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2081
diff changeset
   235
  DefaultValue::Bind ("WifiRateControlAlgorithm", "Aarf");
2079
673a34d2e3d7 use the gnuplot machinery to output a set of plots
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2075
diff changeset
   236
  RunOneExperiment ();
673a34d2e3d7 use the gnuplot machinery to output a set of plots
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2075
diff changeset
   237
  gnuplot.AddDataset (*g_output);
673a34d2e3d7 use the gnuplot machinery to output a set of plots
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2075
diff changeset
   238
  delete g_output;
673a34d2e3d7 use the gnuplot machinery to output a set of plots
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2075
diff changeset
   239
673a34d2e3d7 use the gnuplot machinery to output a set of plots
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2075
diff changeset
   240
  g_output = new GnuplotDataset ("ideal");
2081
434742b27b1e use the new style support
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2079
diff changeset
   241
  g_output->SetStyle (GnuplotDataset::LINES);
2084
24cfc21bda99 use the holland set of modes.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2082
diff changeset
   242
  DefaultValue::Bind ("WifiRtsCtsThreshold", "2200");
2079
673a34d2e3d7 use the gnuplot machinery to output a set of plots
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2075
diff changeset
   243
  DefaultValue::Bind ("WifiRateControlAlgorithm", "Ideal");
673a34d2e3d7 use the gnuplot machinery to output a set of plots
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2075
diff changeset
   244
  RunOneExperiment ();
673a34d2e3d7 use the gnuplot machinery to output a set of plots
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2075
diff changeset
   245
  gnuplot.AddDataset (*g_output);
673a34d2e3d7 use the gnuplot machinery to output a set of plots
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2075
diff changeset
   246
  delete g_output;
2152
5c6c0f580aca use packet sockets and generate all graphics
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2149
diff changeset
   247
2079
673a34d2e3d7 use the gnuplot machinery to output a set of plots
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2075
diff changeset
   248
  gnuplot.GenerateOutput (std::cout);
1884
6056f112404c build wifi sample code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   249
6056f112404c build wifi sample code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   250
  return 0;
6056f112404c build wifi sample code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   251
}