OLD | NEW |
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ | 1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
2 /* | 2 /* |
3 * Copyright (c) 2005,2006 INRIA | 3 * Copyright (c) 2005,2006 INRIA |
4 * | 4 * |
5 * This program is free software; you can redistribute it and/or modify | 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 | 6 * it under the terms of the GNU General Public License version 2 as |
7 * published by the Free Software Foundation; | 7 * published by the Free Software Foundation; |
8 * | 8 * |
9 * This program is distributed in the hope that it will be useful, | 9 * This program is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 virtual EventId ScheduleDestroy (EventImpl *event); | 50 virtual EventId ScheduleDestroy (EventImpl *event); |
51 virtual void Remove (const EventId &ev); | 51 virtual void Remove (const EventId &ev); |
52 virtual void Cancel (const EventId &ev); | 52 virtual void Cancel (const EventId &ev); |
53 virtual bool IsExpired (const EventId &ev) const; | 53 virtual bool IsExpired (const EventId &ev) const; |
54 virtual void Run (void); | 54 virtual void Run (void); |
55 virtual void RunOneEvent (void); | 55 virtual void RunOneEvent (void); |
56 virtual Time Now (void) const; | 56 virtual Time Now (void) const; |
57 virtual Time GetDelayLeft (const EventId &id) const; | 57 virtual Time GetDelayLeft (const EventId &id) const; |
58 virtual Time GetMaximumSimulationTime (void) const; | 58 virtual Time GetMaximumSimulationTime (void) const; |
59 virtual void SetScheduler (ObjectFactory schedulerFactory); | 59 virtual void SetScheduler (ObjectFactory schedulerFactory); |
| 60 virtual uint32_t GetSystemId (void) const;· |
60 virtual uint32_t GetContext (void) const; | 61 virtual uint32_t GetContext (void) const; |
61 | 62 |
62 private: | 63 private: |
63 virtual void DoDispose (void); | 64 virtual void DoDispose (void); |
64 void ProcessOneEvent (void); | 65 void ProcessOneEvent (void); |
65 uint64_t NextTs (void) const; | 66 uint64_t NextTs (void) const; |
66 typedef std::list<EventId> DestroyEvents; | 67 typedef std::list<EventId> DestroyEvents; |
67 | 68 |
68 DestroyEvents m_destroyEvents; | 69 DestroyEvents m_destroyEvents; |
69 bool m_stop; | 70 bool m_stop; |
70 Ptr<Scheduler> m_events; | 71 Ptr<Scheduler> m_events; |
71 uint32_t m_uid; | 72 uint32_t m_uid; |
72 uint32_t m_currentUid; | 73 uint32_t m_currentUid; |
73 uint64_t m_currentTs; | 74 uint64_t m_currentTs; |
74 uint32_t m_currentContext; | 75 uint32_t m_currentContext; |
75 // number of events that have been inserted but not yet scheduled, | 76 // number of events that have been inserted but not yet scheduled, |
76 // not counting the "destroy" events; this is used for validation | 77 // not counting the "destroy" events; this is used for validation |
77 int m_unscheduledEvents; | 78 int m_unscheduledEvents; |
78 }; | 79 }; |
79 | 80 |
80 } // namespace ns3 | 81 } // namespace ns3 |
81 | 82 |
82 #endif /* DEFAULT_SIMULATOR_IMPL_H */ | 83 #endif /* DEFAULT_SIMULATOR_IMPL_H */ |
OLD | NEW |