move code around

--HG--
rename : src/node/application-list.cc => src/applications/application-list.cc
rename : src/node/application-list.h => src/applications/application-list.h
rename : src/node/application.cc => src/applications/application.cc
rename : src/node/application.h => src/applications/application.h
rename : src/node/onoff-application.cc => src/applications/onoff-application.cc
rename : src/node/onoff-application.h => src/applications/onoff-application.h
rename : src/node/arp-cache.cc => src/internet-node/arp-cache.cc
rename : src/node/arp-cache.h => src/internet-node/arp-cache.h
rename : src/node/arp-header.cc => src/internet-node/arp-header.cc
rename : src/node/arp-header.h => src/internet-node/arp-header.h
rename : src/node/arp-ipv4-interface.cc => src/internet-node/arp-ipv4-interface.cc
rename : src/node/arp-ipv4-interface.h => src/internet-node/arp-ipv4-interface.h
rename : src/node/arp.cc => src/internet-node/arp.cc
rename : src/node/arp.h => src/internet-node/arp.h
rename : src/node/ascii-trace.cc => src/internet-node/ascii-trace.cc
rename : src/node/ascii-trace.h => src/internet-node/ascii-trace.h
rename : src/node/header-utils.cc => src/internet-node/header-utils.cc
rename : src/node/header-utils.h => src/internet-node/header-utils.h
rename : src/node/i-arp-private.cc => src/internet-node/i-arp-private.cc
rename : src/node/i-arp-private.h => src/internet-node/i-arp-private.h
rename : src/node/i-ipv4-impl.cc => src/internet-node/i-ipv4-impl.cc
rename : src/node/i-ipv4-impl.h => src/internet-node/i-ipv4-impl.h
rename : src/node/i-ipv4-private.cc => src/internet-node/i-ipv4-private.cc
rename : src/node/i-ipv4-private.h => src/internet-node/i-ipv4-private.h
rename : src/node/i-udp-impl.cc => src/internet-node/i-udp-impl.cc
rename : src/node/i-udp-impl.h => src/internet-node/i-udp-impl.h
rename : src/node/internet-node.cc => src/internet-node/internet-node.cc
rename : src/node/internet-node.h => src/internet-node/internet-node.h
rename : src/node/ipv4-checksum.cc => src/internet-node/ipv4-checksum.cc
rename : src/node/ipv4-checksum.h => src/internet-node/ipv4-checksum.h
rename : src/node/ipv4-end-point-demux.cc => src/internet-node/ipv4-end-point-demux.cc
rename : src/node/ipv4-end-point-demux.h => src/internet-node/ipv4-end-point-demux.h
rename : src/node/ipv4-end-point.cc => src/internet-node/ipv4-end-point.cc
rename : src/node/ipv4-end-point.h => src/internet-node/ipv4-end-point.h
rename : src/node/ipv4-header.cc => src/internet-node/ipv4-header.cc
rename : src/node/ipv4-header.h => src/internet-node/ipv4-header.h
rename : src/node/ipv4-interface.cc => src/internet-node/ipv4-interface.cc
rename : src/node/ipv4-interface.h => src/internet-node/ipv4-interface.h
rename : src/node/ipv4-l4-demux.cc => src/internet-node/ipv4-l4-demux.cc
rename : src/node/ipv4-l4-demux.h => src/internet-node/ipv4-l4-demux.h
rename : src/node/ipv4-l4-protocol.cc => src/internet-node/ipv4-l4-protocol.cc
rename : src/node/ipv4-l4-protocol.h => src/internet-node/ipv4-l4-protocol.h
rename : src/node/ipv4-loopback-interface.cc => src/internet-node/ipv4-loopback-interface.cc
rename : src/node/ipv4-loopback-interface.h => src/internet-node/ipv4-loopback-interface.h
rename : src/node/ipv4.cc => src/internet-node/ipv4.cc
rename : src/node/ipv4.h => src/internet-node/ipv4.h
rename : src/node/l3-demux.cc => src/internet-node/l3-demux.cc
rename : src/node/l3-demux.h => src/internet-node/l3-demux.h
rename : src/node/l3-protocol.cc => src/internet-node/l3-protocol.cc
rename : src/node/l3-protocol.h => src/internet-node/l3-protocol.h
rename : src/node/pcap-trace.cc => src/internet-node/pcap-trace.cc
rename : src/node/pcap-trace.h => src/internet-node/pcap-trace.h
rename : src/node/sgi-hashmap.h => src/internet-node/sgi-hashmap.h
rename : src/node/udp-header.cc => src/internet-node/udp-header.cc
rename : src/node/udp-header.h => src/internet-node/udp-header.h
rename : src/node/udp-socket.cc => src/internet-node/udp-socket.cc
rename : src/node/udp-socket.h => src/internet-node/udp-socket.h
rename : src/node/udp.cc => src/internet-node/udp.cc
rename : src/node/udp.h => src/internet-node/udp.h
This commit is contained in:
Mathieu Lacage committed 2007-05-04 15:04:07 +02:00
1 parent 681415672a
commit fcd1de99c9
60 files changed
+114 -100

No files matched your search

-138
View File
@@ -1,138 +0,0 @@
/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2006 Georgia Tech Research Corporation
*
* 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
*
* Author: George F. Riley<riley@ece.gatech.edu>
*/
#ifndef __APPLICATION_H__
#define __APPLICATION_H__
//
// \brief The base class for all ns3 applicationes
//
// Class Application is the base class for all ns3 applications.
// Applications are associated with individual nodes, and are created
// using the AddApplication method in the ApplicationManager capability.
//
// Conceptually, an application has zero or more Socket
// objects associated with it, that are created using the Socket
// creation API of the Kernel capability. The Socket object
// API is modeled after the
// well-known BSD sockets interface, although it is somewhat
// simplified for use with ns3. Further, any socket call that
// would normally "block" in normal sockets will return immediately
// in ns3. A set of "upcalls" are defined that will be called when
// the previous blocking call would normally exit. THis is documented
// in more detail Socket class in socket.h.
//
// There is a second application class in ns3, called "ThreadedApplication"
// that implements a true sockets interface, which should be used
// when porting existing sockets code to ns3. The true
// sockets approach is significantly
// less memory--efficient using private stacks for each defined application,
// so that approach should be used with care. The design and implementation
// of the ThreadedApplication are still being discussed.
#include "ns3/event-id.h"
#include "ns3/nstime.h"
#include "ns3/object.h"
namespace ns3 {
class Node;
class RandomVariable;
class Application : public Object
{
public:
Application(Node *);
Application(const Application&); // Copy constructor
Application& operator=(const Application&); // Assignment operator
virtual ~Application();
virtual Application* Copy() const = 0; // All applications must provide
// \brief Specify application start time
// Applications start at various times in the simulation scenario.
// The Start method specifies when the application should be
// started. The application subclasses should override the
// private "StartApplication" method defined below, which is called at the
// time specified, to cause the application to begin.
// \param Start time for this application, relative to the
// current simulation time.
void Start(const Time&);
// \brief Same as above, but uses a random variable for start time
// The random variable returns the desired start time in units of
// Seconds.
void Start(const RandomVariable&);
// \brief Specify application stop time
// Once an application has started, it is sometimes useful
// to stop the application. The Stop method specifies when an
// application is to stop. The application subclasses should override
// the private StopApplication method defined below, to cause the application
// to stop.
// \param Stop time for this application, relative to the
// current simulation time.
void Stop(const Time&);
// \brief Same as above, but uses a random variable for stop time
// The random variable returns the desired stop time in units of
// Seconds.
void Stop(const RandomVariable&);
// \brief Attaches an application to a specific node
// Specifies which node object this application is associated with.
// \param Node object to associate with this application.
void SetNode(Node *);
// \brief Returns the pointer to the attached node.
Node* PeekNode() const;
// Members
Node * m_node; // All applications have an associated node
RandomVariable* m_startVar; // Random variable for start time
RandomVariable* m_stopVar; // Random variable for stop time
EventId m_startEvent;// Event identifier for start event
EventId m_stopEvent; // Event identifier for the stop event
bool m_start; // True if start event scheduled
bool m_stop; // True if stop event scheduled
protected:
// \brief Application specific startup code
// The StartApplication method is called at the start time specifed by Start
// This method should be overridden by all or most application
// subclasses.
virtual void StartApplication();
// \brief Application specific shutdown code
// The StopApplication method is called at the stop time specifed by Stop
// This method should be overridden by all or most application
// subclasses.
virtual void StopApplication();
virtual void DoDispose (void);
private:
// Helpers
void ScheduleStart();
void ScheduleStop();
};
} //namespace ns3
#endif