add tutorial directory and hello-simulator
authorCraig Dowell <craigdo@ee.washington.edu>
Thu, 13 Sep 2007 11:04:47 -0700
changeset 1502 4b4799567e2a
parent 1501 665e07dbd919
child 1503 53dd8f414ba6
add tutorial directory and hello-simulator
examples/udp-echo.cc
tutorial/hello-simulator.cc
tutorial/waf
tutorial/wscript
wscript
--- a/examples/udp-echo.cc	Thu Sep 13 10:53:24 2007 -0700
+++ b/examples/udp-echo.cc	Thu Sep 13 11:04:47 2007 -0700
@@ -39,7 +39,7 @@
 #include "ns3/csma-net-device.h"
 #include "ns3/csma-topology.h"
 #include "ns3/csma-ipv4-topology.h"
-#include "ns3/eui48-address.h"
+#include "ns3/mac48-address.h"
 #include "ns3/ipv4-address.h"
 #include "ns3/inet-socket-address.h"
 #include "ns3/ipv4.h"
@@ -126,16 +126,16 @@
 // zero.
 //
   uint32_t nd0 = CsmaIpv4Topology::AddIpv4CsmaNetDevice (n0, lan, 
-    Eui48Address("08:00:2e:00:00:00"));
+    Mac48Address("08:00:2e:00:00:00"));
 
   uint32_t nd1 = CsmaIpv4Topology::AddIpv4CsmaNetDevice (n1, lan, 
-    Eui48Address("08:00:2e:00:00:01"));
+    Mac48Address("08:00:2e:00:00:01"));
 
   uint32_t nd2 = CsmaIpv4Topology::AddIpv4CsmaNetDevice (n2, lan, 
-    Eui48Address("08:00:2e:00:00:02"));
+    Mac48Address("08:00:2e:00:00:02"));
 
   uint32_t nd3 = CsmaIpv4Topology::AddIpv4CsmaNetDevice (n3, lan, 
-    Eui48Address("08:00:2e:00:00:03"));
+    Mac48Address("08:00:2e:00:00:03"));
 //
 // We've got the "hardware" in place.  Now we need to add IP addresses.
 //
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tutorial/hello-simulator.cc	Thu Sep 13 11:04:47 2007 -0700
@@ -0,0 +1,29 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation;
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#include "ns3/debug.h"
+
+using namespace ns3;
+
+NS_DEBUG_COMPONENT_DEFINE ("HelloSimulator");
+
+int 
+main (int argc, char *argv[])
+{
+  DebugComponentEnable("HelloSimulator");
+
+  NS_DEBUG("Hello Simulator");
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tutorial/waf	Thu Sep 13 11:04:47 2007 -0700
@@ -0,0 +1,1 @@
+exec "`dirname "$0"`"/../waf "$@"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tutorial/wscript	Thu Sep 13 11:04:47 2007 -0700
@@ -0,0 +1,6 @@
+## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
+
+def build(bld):
+    obj = bld.create_ns3_program('hello-simulator',
+        ['core'])
+    obj.source = 'hello-simulator.cc'
--- a/wscript	Thu Sep 13 10:53:24 2007 -0700
+++ b/wscript	Thu Sep 13 11:04:47 2007 -0700
@@ -173,7 +173,7 @@
 
     # process subfolders from here
     bld.add_subdirs('src')
-    bld.add_subdirs('samples utils examples')
+    bld.add_subdirs('samples utils examples tutorial')
 
     ## Create a single ns3 library containing all modules
     lib = bld.create_obj('cpp', 'shlib')