tutorial/hello-simulator.cc
author Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
Fri, 26 Oct 2007 13:14:29 +0200
changeset 2030 e32adc825a74
parent 1773 240db09c9819
child 1804 9c11e776f501
permissions -rw-r--r--
start of work towards a wifi documentation
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1502
4b4799567e2a add tutorial directory and hello-simulator
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
     1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
4b4799567e2a add tutorial directory and hello-simulator
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
     2
/*
4b4799567e2a add tutorial directory and hello-simulator
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
     3
 * This program is free software; you can redistribute it and/or modify
4b4799567e2a add tutorial directory and hello-simulator
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
     4
 * it under the terms of the GNU General Public License version 2 as
4b4799567e2a add tutorial directory and hello-simulator
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
     5
 * published by the Free Software Foundation;
4b4799567e2a add tutorial directory and hello-simulator
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
     6
 *
4b4799567e2a add tutorial directory and hello-simulator
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
     7
 * This program is distributed in the hope that it will be useful,
4b4799567e2a add tutorial directory and hello-simulator
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
     8
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
4b4799567e2a add tutorial directory and hello-simulator
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
     9
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
4b4799567e2a add tutorial directory and hello-simulator
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    10
 * GNU General Public License for more details.
4b4799567e2a add tutorial directory and hello-simulator
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    11
 *
4b4799567e2a add tutorial directory and hello-simulator
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    12
 * You should have received a copy of the GNU General Public License
4b4799567e2a add tutorial directory and hello-simulator
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    13
 * along with this program; if not, write to the Free Software
4b4799567e2a add tutorial directory and hello-simulator
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    14
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
4b4799567e2a add tutorial directory and hello-simulator
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    15
 */
4b4799567e2a add tutorial directory and hello-simulator
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    16
1503
53dd8f414ba6 sorting out logging
Craig Dowell <craigdo@ee.washington.edu>
parents: 1502
diff changeset
    17
#include "ns3/log.h"
1773
240db09c9819 env var changes
Craig Dowell <craigdo@ee.washington.edu>
parents: 1772
diff changeset
    18
#include "ns3/debug.h"
1502
4b4799567e2a add tutorial directory and hello-simulator
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    19
1506
3c8b23550e6a disable log unless debug build
Craig Dowell <craigdo@ee.washington.edu>
parents: 1503
diff changeset
    20
NS_LOG_COMPONENT_DEFINE ("HelloSimulator");
1502
4b4799567e2a add tutorial directory and hello-simulator
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    21
1506
3c8b23550e6a disable log unless debug build
Craig Dowell <craigdo@ee.washington.edu>
parents: 1503
diff changeset
    22
using namespace ns3;
1502
4b4799567e2a add tutorial directory and hello-simulator
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    23
4b4799567e2a add tutorial directory and hello-simulator
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    24
int 
4b4799567e2a add tutorial directory and hello-simulator
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    25
main (int argc, char *argv[])
4b4799567e2a add tutorial directory and hello-simulator
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    26
{
1773
240db09c9819 env var changes
Craig Dowell <craigdo@ee.washington.edu>
parents: 1772
diff changeset
    27
  DebugComponentEnable ("Log");
240db09c9819 env var changes
Craig Dowell <craigdo@ee.washington.edu>
parents: 1772
diff changeset
    28
240db09c9819 env var changes
Craig Dowell <craigdo@ee.washington.edu>
parents: 1772
diff changeset
    29
  //  LogComponentEnable ("HelloSimulator", 
240db09c9819 env var changes
Craig Dowell <craigdo@ee.washington.edu>
parents: 1772
diff changeset
    30
  //    LogLevel (LOG_LEVEL_INFO | LOG_PREFIX_ALL));
1502
4b4799567e2a add tutorial directory and hello-simulator
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    31
1503
53dd8f414ba6 sorting out logging
Craig Dowell <craigdo@ee.washington.edu>
parents: 1502
diff changeset
    32
  NS_LOG_INFO ("Hello Simulator");
1502
4b4799567e2a add tutorial directory and hello-simulator
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    33
}