LEFT | RIGHT |
(no file at all) | |
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) 2007 INRIA | 3 * Copyright (c) 2007 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 |
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 * GNU General Public License for more details. | 12 * GNU General Public License for more details. |
13 * | 13 * |
14 * You should have received a copy of the GNU General Public License | 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 | 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 | 16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
17 * | 17 * |
18 * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr> | 18 * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr> |
19 */ | 19 */ |
20 #ifndef TIMER_H | 20 #ifndef TIMER_H |
21 #define TIMER_H | 21 #define TIMER_H |
22 | 22 |
23 #include "fatal-error.h" | 23 #include "fatal-error.h" |
24 #include "nstime.h" | 24 #include "nstime.h" |
25 #include "event-id.h" | 25 #include "event-id.h" |
26 #include "int-to-type.h" | 26 #include "int-to-type.h" |
| 27 |
| 28 #include "ns3/ns3-module.h" |
| 29 #define NS3_MODULE NS3_CORE_MODULE |
| 30 #include "ns3/ns3-export.h" |
27 | 31 |
28 /** | 32 /** |
29 * \file | 33 * \file |
30 * \ingroup timer | 34 * \ingroup timer |
31 * ns3::Timer class declaration. | 35 * ns3::Timer class declaration. |
32 */ | 36 */ |
33 | 37 |
34 namespace ns3 { | 38 namespace ns3 { |
35 | 39 |
36 /** | 40 /** |
(...skipping 26 matching lines...) Expand all Loading... |
63 * A Timer can be suspended, resumed, cancelled and queried for the | 67 * A Timer can be suspended, resumed, cancelled and queried for the |
64 * time left, but it can't be extended (except by suspending and | 68 * time left, but it can't be extended (except by suspending and |
65 * resuming.) | 69 * resuming.) |
66 * | 70 * |
67 * A timer can also be used to enforce a set of predefined event lifetime | 71 * A timer can also be used to enforce a set of predefined event lifetime |
68 * management policies. These policies are specified at construction time | 72 * management policies. These policies are specified at construction time |
69 * and cannot be changed after. | 73 * and cannot be changed after. |
70 * | 74 * |
71 * \see Watchdog for a simpler interface for a watchdog timer. | 75 * \see Watchdog for a simpler interface for a watchdog timer. |
72 */ | 76 */ |
73 class Timer | 77 class NS3_EXPORT Timer |
74 { | 78 { |
75 public: | 79 public: |
76 /** | 80 /** |
77 * The policy to use to manager the internal timer when an | 81 * The policy to use to manager the internal timer when an |
78 * instance of the Timer class is destroyed. | 82 * instance of the Timer class is destroyed. |
79 */ | 83 */ |
80 enum DestroyPolicy | 84 enum DestroyPolicy |
81 { | 85 { |
82 /** | 86 /** |
83 * This policy cancels the event from the destructor of the Timer | 87 * This policy cancels the event from the destructor of the Timer |
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
386 { | 390 { |
387 NS_FATAL_ERROR ("You cannot set the arguments of a Timer before setting it
s function."); | 391 NS_FATAL_ERROR ("You cannot set the arguments of a Timer before setting it
s function."); |
388 return; | 392 return; |
389 } | 393 } |
390 m_impl->SetArgs (a1, a2, a3, a4, a5, a6); | 394 m_impl->SetArgs (a1, a2, a3, a4, a5, a6); |
391 } | 395 } |
392 | 396 |
393 } // namespace ns3 | 397 } // namespace ns3 |
394 | 398 |
395 #endif /* TIMER_H */ | 399 #endif /* TIMER_H */ |
LEFT | RIGHT |