A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
visual-simulator-impl.h
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2010 Gustavo Carneiro
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License version 2 as
7  * published by the Free Software Foundation;
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * Author: Gustavo Carneiro <gjcarneiro@gmail.com>
19  */
20 
21 #ifndef VISUAL_SIMULATOR_IMPL_H
22 #define VISUAL_SIMULATOR_IMPL_H
23 
24 #include "ns3/simulator-impl.h"
25 
26 namespace ns3 {
27 
28 
46 {
47 public:
48  static TypeId GetTypeId (void);
49 
52 
53  virtual void Destroy ();
54  virtual bool IsFinished (void) const;
55  virtual void Stop (void);
56  virtual void Stop (Time const &time);
57  virtual EventId Schedule (Time const &time, EventImpl *event);
58  virtual void ScheduleWithContext (uint32_t context, Time const &time, EventImpl *event);
59  virtual EventId ScheduleNow (EventImpl *event);
60  virtual EventId ScheduleDestroy (EventImpl *event);
61  virtual void Remove (const EventId &ev);
62  virtual void Cancel (const EventId &ev);
63  virtual bool IsExpired (const EventId &ev) const;
64  virtual void Run (void);
65  virtual Time Now (void) const;
66  virtual Time GetDelayLeft (const EventId &id) const;
67  virtual Time GetMaximumSimulationTime (void) const;
68  virtual void SetScheduler (ObjectFactory schedulerFactory);
69  virtual uint32_t GetSystemId (void) const;
70  virtual uint32_t GetContext (void) const;
71 
73  void RunRealSimulator (void);
74 
75 protected:
76  void DoDispose ();
77  void NotifyConstructionCompleted (void);
78 
79 private:
83 
84 };
85 
86 } // namespace ns3
87 
88 #endif /* DEFAULT_SIMULATOR_IMPL_H */
void NotifyConstructionCompleted(void)
This method is invoked once all member attributes have been initialized.
keep track of time values and allow control of global simulation resolution
Definition: nstime.h:81
smart pointer class similar to boost::intrusive_ptr
Definition: ptr.h:59
virtual void Run(void)
Run the simulation until one of:
void DoDispose()
This method is called by Object::Dispose or by the object's destructor, whichever comes first...
virtual void ScheduleWithContext(uint32_t context, Time const &time, EventImpl *event)
virtual void SetScheduler(ObjectFactory schedulerFactory)
A replacement simulator that starts the visualizer.
virtual void Cancel(const EventId &ev)
Set the cancel bit on this event: the event's associated function will not be invoked when it expires...
virtual bool IsFinished(void) const
If there are no more events lefts to be scheduled, or if simulation time has already reached the "sto...
virtual void Stop(void)
If an event invokes this method, it will be the last event scheduled by the Simulator::Run method bef...
virtual Time GetMaximumSimulationTime(void) const
virtual EventId Schedule(Time const &time, EventImpl *event)
virtual void Remove(const EventId &ev)
Remove an event from the event list.
virtual Time GetDelayLeft(const EventId &id) const
virtual void Destroy()
This method is typically invoked at the end of a simulation to avoid false-positive reports by a leak...
virtual EventId ScheduleNow(EventImpl *event)
Ptr< SimulatorImpl > m_simulator
void RunRealSimulator(void)
calls Run() in the wrapped simulator
instantiate subclasses of ns3::Object.
a simulation event
Definition: event-impl.h:39
an identifier for simulation events.
Definition: event-id.h:46
virtual bool IsExpired(const EventId &ev) const
This method has O(1) complexity.
virtual uint32_t GetSystemId(void) const
virtual Time Now(void) const
Return the "current simulation time".
a unique identifier for an interface.
Definition: type-id.h:49
virtual uint32_t GetContext(void) const
virtual EventId ScheduleDestroy(EventImpl *event)
Doxygen introspection did not find any typical Config paths.
Ptr< SimulatorImpl > GetSim()