|
|
| 1 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
| 2 |
/* |
| 3 |
* Copyright (c) 2008 University of Washington |
| 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 |
|
| 19 |
#ifndef REALTIME_SIMULATOR_H |
| 20 |
#define REALTIME_SIMULATOR_H |
| 21 |
|
| 22 |
#include "simulator.h" |
| 23 |
#include "realtime-simulator-impl.h" |
| 24 |
|
| 25 |
namespace ns3 { |
| 26 |
|
| 27 |
/** |
| 28 |
* \ingroup simulator |
| 29 |
* |
| 30 |
* \brief Extension class to control the scheduling of real-time simulation |
| 31 |
* events. Intended to be used by threads driven by "external" system |
| 32 |
* events and will schedule events using the current real-time instead of |
| 33 |
* the current simulation time. |
| 34 |
*/ |
| 35 |
class RealtimeSimulatorExtension |
| 36 |
{ |
| 37 |
public: |
| 38 |
/** |
| 39 |
* Schedule an event to expire at the relative real-time "time" |
| 40 |
* is reached. This can be thought of as scheduling an event |
| 41 |
* for the current real-time plus the Time passed as a parameter |
| 42 |
* |
| 43 |
* When the event expires (when it becomes due to be run), the |
| 44 |
* input method will be invoked on the input object. |
| 45 |
* |
| 46 |
* @param time the relative expiration time of the event. |
| 47 |
* @param mem_ptr member method pointer to invoke |
| 48 |
* @param obj the object on which to invoke the member method |
| 49 |
* @returns an id for the scheduled event. |
| 50 |
*/ |
| 51 |
template <typename MEM, typename OBJ> |
| 52 |
static EventId ScheduleReal (Time const &time, MEM mem_ptr, OBJ obj); |
| 53 |
|
| 54 |
/** |
| 55 |
* @param time the relative expiration time of the event. |
| 56 |
* @param mem_ptr member method pointer to invoke |
| 57 |
* @param obj the object on which to invoke the member method |
| 58 |
* @param a1 the first argument to pass to the invoked method |
| 59 |
* @returns an id for the scheduled event. |
| 60 |
*/ |
| 61 |
template <typename MEM, typename OBJ, typename T1> |
| 62 |
static EventId ScheduleReal (Time const &time, MEM mem_ptr, OBJ obj, T1 a1); |
| 63 |
|
| 64 |
/** |
| 65 |
* @param time the relative expiration time of the event. |
| 66 |
* @param mem_ptr member method pointer to invoke |
| 67 |
* @param obj the object on which to invoke the member method |
| 68 |
* @param a1 the first argument to pass to the invoked method |
| 69 |
* @param a2 the second argument to pass to the invoked method |
| 70 |
* @returns an id for the scheduled event. |
| 71 |
*/ |
| 72 |
template <typename MEM, typename OBJ, typename T1, typename T2> |
| 73 |
static EventId ScheduleReal (Time const &time, MEM mem_ptr, OBJ obj, T1 a1, T2 a2); |
| 74 |
|
| 75 |
/** |
| 76 |
* @param time the relative expiration time of the event. |
| 77 |
* @param mem_ptr member method pointer to invoke |
| 78 |
* @param obj the object on which to invoke the member method |
| 79 |
* @param a1 the first argument to pass to the invoked method |
| 80 |
* @param a2 the second argument to pass to the invoked method |
| 81 |
* @param a3 the third argument to pass to the invoked method |
| 82 |
* @returns an id for the scheduled event. |
| 83 |
*/ |
| 84 |
template <typename MEM, typename OBJ, |
| 85 |
typename T1, typename T2, typename T3> |
| 86 |
static EventId ScheduleReal (Time const &time, MEM mem_ptr, OBJ obj, T1 a1, T2 a2, T3 a3); |
| 87 |
|
| 88 |
/** |
| 89 |
* @param time the relative expiration time of the event. |
| 90 |
* @param mem_ptr member method pointer to invoke |
| 91 |
* @param obj the object on which to invoke the member method |
| 92 |
* @param a1 the first argument to pass to the invoked method |
| 93 |
* @param a2 the second argument to pass to the invoked method |
| 94 |
* @param a3 the third argument to pass to the invoked method |
| 95 |
* @param a4 the fourth argument to pass to the invoked method |
| 96 |
* @returns an id for the scheduled event. |
| 97 |
*/ |
| 98 |
template <typename MEM, typename OBJ, |
| 99 |
typename T1, typename T2, typename T3, typename T4> |
| 100 |
static EventId ScheduleReal (Time const &time, MEM mem_ptr, OBJ obj, T1 a1, T2 a2, T3 a3, T4 a4); |
| 101 |
|
| 102 |
/** |
| 103 |
* @param time the relative expiration time of the event. |
| 104 |
* @param mem_ptr member method pointer to invoke |
| 105 |
* @param obj the object on which to invoke the member method |
| 106 |
* @param a1 the first argument to pass to the invoked method |
| 107 |
* @param a2 the second argument to pass to the invoked method |
| 108 |
* @param a3 the third argument to pass to the invoked method |
| 109 |
* @param a4 the fourth argument to pass to the invoked method |
| 110 |
* @param a5 the fifth argument to pass to the invoked method |
| 111 |
* @returns an id for the scheduled event. |
| 112 |
*/ |
| 113 |
template <typename MEM, typename OBJ, |
| 114 |
typename T1, typename T2, typename T3, typename T4, typename T5> |
| 115 |
static EventId ScheduleReal (Time const &time, MEM mem_ptr, OBJ obj, |
| 116 |
T1 a1, T2 a2, T3 a3, T4 a4, T5 a5); |
| 117 |
/** |
| 118 |
* @param time the relative expiration time of the event. |
| 119 |
* @param f the function to invoke |
| 120 |
* @returns an id for the scheduled event. |
| 121 |
*/ |
| 122 |
static EventId ScheduleReal (Time const &time, void (*f) (void)); |
| 123 |
|
| 124 |
/** |
| 125 |
* @param time the relative expiration time of the event. |
| 126 |
* @param f the function to invoke |
| 127 |
* @param a1 the first argument to pass to the function to invoke |
| 128 |
* @returns an id for the scheduled event. |
| 129 |
*/ |
| 130 |
template <typename U1, typename T1> |
| 131 |
static EventId ScheduleReal (Time const &time, void (*f) (U1), T1 a1); |
| 132 |
|
| 133 |
/** |
| 134 |
* @param time the relative expiration time of the event. |
| 135 |
* @param f the function to invoke |
| 136 |
* @param a1 the first argument to pass to the function to invoke |
| 137 |
* @param a2 the second argument to pass to the function to invoke |
| 138 |
* @returns an id for the scheduled event. |
| 139 |
*/ |
| 140 |
template <typename U1, typename U2, typename T1, typename T2> |
| 141 |
static EventId ScheduleReal (Time const &time, void (*f) (U1,U2), T1 a1, T2 a2); |
| 142 |
|
| 143 |
/** |
| 144 |
* @param time the relative expiration time of the event. |
| 145 |
* @param f the function to invoke |
| 146 |
* @param a1 the first argument to pass to the function to invoke |
| 147 |
* @param a2 the second argument to pass to the function to invoke |
| 148 |
* @param a3 the third argument to pass to the function to invoke |
| 149 |
* @returns an id for the scheduled event. |
| 150 |
*/ |
| 151 |
template <typename U1, typename U2, typename U3, typename T1, typename T2, typename T3> |
| 152 |
static EventId ScheduleReal (Time const &time, void (*f) (U1,U2,U3), T1 a1, T2 a2, T3 a3); |
| 153 |
|
| 154 |
/** |
| 155 |
* @param time the relative expiration time of the event. |
| 156 |
* @param f the function to invoke |
| 157 |
* @param a1 the first argument to pass to the function to invoke |
| 158 |
* @param a2 the second argument to pass to the function to invoke |
| 159 |
* @param a3 the third argument to pass to the function to invoke |
| 160 |
* @param a4 the fourth argument to pass to the function to invoke |
| 161 |
* @returns an id for the scheduled event. |
| 162 |
*/ |
| 163 |
template <typename U1, typename U2, typename U3, typename U4, |
| 164 |
typename T1, typename T2, typename T3, typename T4> |
| 165 |
static EventId ScheduleReal (Time const &time, void (*f) (U1,U2,U3,U4), T1 a1, T2 a2, T3 a3, T4 a4); |
| 166 |
|
| 167 |
/** |
| 168 |
* @param time the relative expiration time of the event. |
| 169 |
* @param f the function to invoke |
| 170 |
* @param a1 the first argument to pass to the function to invoke |
| 171 |
* @param a2 the second argument to pass to the function to invoke |
| 172 |
* @param a3 the third argument to pass to the function to invoke |
| 173 |
* @param a4 the fourth argument to pass to the function to invoke |
| 174 |
* @param a5 the fifth argument to pass to the function to invoke |
| 175 |
* @returns an id for the scheduled event. |
| 176 |
*/ |
| 177 |
template <typename U1, typename U2, typename U3, typename U4, typename U5, |
| 178 |
typename T1, typename T2, typename T3, typename T4, typename T5> |
| 179 |
static EventId ScheduleReal (Time const &time, void (*f) (U1,U2,U3,U4,U5), T1 a1, T2 a2, T3 a3, T4 a4, T5 a5); |
| 180 |
|
| 181 |
/** |
| 182 |
* Schedule an event to expire Now. All events scheduled to |
| 183 |
* to expire "Now" are scheduled FIFO, after all normal events |
| 184 |
* have expired. |
| 185 |
* |
| 186 |
* @param mem_ptr member method pointer to invoke |
| 187 |
* @param obj the object on which to invoke the member method |
| 188 |
*/ |
| 189 |
template <typename MEM, typename OBJ> |
| 190 |
static EventId ScheduleRealNow (MEM mem_ptr, OBJ obj); |
| 191 |
|
| 192 |
/** |
| 193 |
* @param mem_ptr member method pointer to invoke |
| 194 |
* @param obj the object on which to invoke the member method |
| 195 |
* @param a1 the first argument to pass to the invoked method |
| 196 |
*/ |
| 197 |
template <typename MEM, typename OBJ, |
| 198 |
typename T1> |
| 199 |
static EventId ScheduleRealNow (MEM mem_ptr, OBJ obj, T1 a1); |
| 200 |
|
| 201 |
/** |
| 202 |
* @param mem_ptr member method pointer to invoke |
| 203 |
* @param obj the object on which to invoke the member method |
| 204 |
* @param a1 the first argument to pass to the invoked method |
| 205 |
* @param a2 the second argument to pass to the invoked method |
| 206 |
*/ |
| 207 |
template <typename MEM, typename OBJ, |
| 208 |
typename T1, typename T2> |
| 209 |
static EventId ScheduleRealNow (MEM mem_ptr, OBJ obj, T1 a1, T2 a2); |
| 210 |
|
| 211 |
/** |
| 212 |
* @param mem_ptr member method pointer to invoke |
| 213 |
* @param obj the object on which to invoke the member method |
| 214 |
* @param a1 the first argument to pass to the invoked method |
| 215 |
* @param a2 the second argument to pass to the invoked method |
| 216 |
* @param a3 the third argument to pass to the invoked method |
| 217 |
*/ |
| 218 |
template <typename MEM, typename OBJ, |
| 219 |
typename T1, typename T2, typename T3> |
| 220 |
static EventId ScheduleRealNow (MEM mem_ptr, OBJ obj, T1 a1, T2 a2, T3 a3); |
| 221 |
|
| 222 |
/** |
| 223 |
* @param mem_ptr member method pointer to invoke |
| 224 |
* @param obj the object on which to invoke the member method |
| 225 |
* @param a1 the first argument to pass to the invoked method |
| 226 |
* @param a2 the second argument to pass to the invoked method |
| 227 |
* @param a3 the third argument to pass to the invoked method |
| 228 |
* @param a4 the fourth argument to pass to the invoked method |
| 229 |
*/ |
| 230 |
template <typename MEM, typename OBJ, |
| 231 |
typename T1, typename T2, typename T3, typename T4> |
| 232 |
static EventId ScheduleRealNow (MEM mem_ptr, OBJ obj, |
| 233 |
T1 a1, T2 a2, T3 a3, T4 a4); |
| 234 |
/** |
| 235 |
* @param mem_ptr member method pointer to invoke |
| 236 |
* @param obj the object on which to invoke the member method |
| 237 |
* @param a1 the first argument to pass to the invoked method |
| 238 |
* @param a2 the second argument to pass to the invoked method |
| 239 |
* @param a3 the third argument to pass to the invoked method |
| 240 |
* @param a4 the fourth argument to pass to the invoked method |
| 241 |
* @param a5 the fifth argument to pass to the invoked method |
| 242 |
*/ |
| 243 |
template <typename MEM, typename OBJ, |
| 244 |
typename T1, typename T2, typename T3, typename T4, typename T5> |
| 245 |
static EventId ScheduleRealNow (MEM mem_ptr, OBJ obj, |
| 246 |
T1 a1, T2 a2, T3 a3, T4 a4, T5 a5); |
| 247 |
/** |
| 248 |
* @param f the function to invoke |
| 249 |
*/ |
| 250 |
static EventId ScheduleRealNow (void (*f) (void)); |
| 251 |
|
| 252 |
/** |
| 253 |
* @param f the function to invoke |
| 254 |
* @param a1 the first argument to pass to the function to invoke |
| 255 |
*/ |
| 256 |
template <typename U1, |
| 257 |
typename T1> |
| 258 |
static EventId ScheduleRealNow (void (*f) (U1), T1 a1); |
| 259 |
|
| 260 |
/** |
| 261 |
* @param f the function to invoke |
| 262 |
* @param a1 the first argument to pass to the function to invoke |
| 263 |
* @param a2 the second argument to pass to the function to invoke |
| 264 |
*/ |
| 265 |
template <typename U1, typename U2, |
| 266 |
typename T1, typename T2> |
| 267 |
static EventId ScheduleRealNow (void (*f) (U1,U2), T1 a1, T2 a2); |
| 268 |
|
| 269 |
/** |
| 270 |
* @param f the function to invoke |
| 271 |
* @param a1 the first argument to pass to the function to invoke |
| 272 |
* @param a2 the second argument to pass to the function to invoke |
| 273 |
* @param a3 the third argument to pass to the function to invoke |
| 274 |
*/ |
| 275 |
template <typename U1, typename U2, typename U3, |
| 276 |
typename T1, typename T2, typename T3> |
| 277 |
static EventId ScheduleRealNow (void (*f) (U1,U2,U3), T1 a1, T2 a2, T3 a3); |
| 278 |
|
| 279 |
/** |
| 280 |
* @param f the function to invoke |
| 281 |
* @param a1 the first argument to pass to the function to invoke |
| 282 |
* @param a2 the second argument to pass to the function to invoke |
| 283 |
* @param a3 the third argument to pass to the function to invoke |
| 284 |
* @param a4 the fourth argument to pass to the function to invoke |
| 285 |
*/ |
| 286 |
template <typename U1, typename U2, typename U3, typename U4, |
| 287 |
typename T1, typename T2, typename T3, typename T4> |
| 288 |
static EventId ScheduleRealNow (void (*f) (U1,U2,U3,U4), T1 a1, T2 a2, T3 a3, T4 a4); |
| 289 |
|
| 290 |
/** |
| 291 |
* @param f the function to invoke |
| 292 |
* @param a1 the first argument to pass to the function to invoke |
| 293 |
* @param a2 the second argument to pass to the function to invoke |
| 294 |
* @param a3 the third argument to pass to the function to invoke |
| 295 |
* @param a4 the fourth argument to pass to the function to invoke |
| 296 |
* @param a5 the fifth argument to pass to the function to invoke |
| 297 |
*/ |
| 298 |
template <typename U1, typename U2, typename U3, typename U4, typename U5, |
| 299 |
typename T1, typename T2, typename T3, typename T4, typename T5> |
| 300 |
static EventId ScheduleRealNow (void (*f) (U1,U2,U3,U4,U5), T1 a1, T2 a2, T3 a3, T4 a4, T5 a5); |
| 301 |
|
| 302 |
/** |
| 303 |
* Return the "current normalized real-time". |
| 304 |
*/ |
| 305 |
static Time RealNow (void); |
| 306 |
|
| 307 |
/** |
| 308 |
* \param time delay until the event expires |
| 309 |
* \param event the event to schedule |
| 310 |
* \returns a unique identifier for the newly-scheduled event. |
| 311 |
* |
| 312 |
* This method will be typically used by language bindings |
| 313 |
* to delegate events to their own subclass of the EventImpl base class. |
| 314 |
*/ |
| 315 |
static EventId ScheduleReal (Time const &time, const Ptr<EventImpl> &event); |
| 316 |
|
| 317 |
/** |
| 318 |
* \param event the event to schedule |
| 319 |
* \returns a unique identifier for the newly-scheduled event. |
| 320 |
* |
| 321 |
* This method will be typically used by language bindings |
| 322 |
* to delegate events to their own subclass of the EventImpl base class. |
| 323 |
*/ |
| 324 |
static EventId ScheduleRealNow (const Ptr<EventImpl> &event); |
| 325 |
private: |
| 326 |
RealtimeSimulatorExtension (); |
| 327 |
~RealtimeSimulatorExtension (); |
| 328 |
|
| 329 |
static RealtimeSimulatorImpl *GetRealtimeImpl (void); |
| 330 |
}; |
| 331 |
|
| 332 |
template <typename MEM, typename OBJ> |
| 333 |
EventId RealtimeSimulatorExtension::ScheduleReal (Time const &time, MEM mem_ptr, OBJ obj) |
| 334 |
{ |
| 335 |
return ScheduleReal (time, Simulator::MakeEvent (mem_ptr, obj)); |
| 336 |
} |
| 337 |
|
| 338 |
template <typename MEM, typename OBJ, |
| 339 |
typename T1> |
| 340 |
EventId RealtimeSimulatorExtension::ScheduleReal (Time const &time, MEM mem_ptr, OBJ obj, T1 a1) |
| 341 |
{ |
| 342 |
return ScheduleReal (time, Simulator::MakeEvent (mem_ptr, obj, a1)); |
| 343 |
} |
| 344 |
|
| 345 |
template <typename MEM, typename OBJ, |
| 346 |
typename T1, typename T2> |
| 347 |
EventId RealtimeSimulatorExtension::ScheduleReal (Time const &time, MEM mem_ptr, OBJ obj, T1 a1, T2 a2) |
| 348 |
{ |
| 349 |
return ScheduleReal (time, Simulator::MakeEvent (mem_ptr, obj, a1, a2)); |
| 350 |
} |
| 351 |
|
| 352 |
template <typename MEM, typename OBJ, |
| 353 |
typename T1, typename T2, typename T3> |
| 354 |
EventId RealtimeSimulatorExtension::ScheduleReal (Time const &time, MEM mem_ptr, OBJ obj, T1 a1, T2 a2, T3 a3) |
| 355 |
{ |
| 356 |
return ScheduleReal (time, Simulator::MakeEvent (mem_ptr, obj, a1, a2, a3)); |
| 357 |
} |
| 358 |
|
| 359 |
template <typename MEM, typename OBJ, |
| 360 |
typename T1, typename T2, typename T3, typename T4> |
| 361 |
EventId RealtimeSimulatorExtension::ScheduleReal (Time const &time, MEM mem_ptr, OBJ obj, T1 a1, T2 a2, T3 a3, T4 a4) |
| 362 |
{ |
| 363 |
return ScheduleReal (time, Simulator::MakeEvent (mem_ptr, obj, a1, a2, a3, a4)); |
| 364 |
} |
| 365 |
|
| 366 |
template <typename MEM, typename OBJ, |
| 367 |
typename T1, typename T2, typename T3, typename T4, typename T5> |
| 368 |
EventId RealtimeSimulatorExtension::ScheduleReal (Time const &time, MEM mem_ptr, OBJ obj, |
| 369 |
T1 a1, T2 a2, T3 a3, T4 a4, T5 a5) |
| 370 |
{ |
| 371 |
return ScheduleReal (time, Simulator::MakeEvent (mem_ptr, obj, a1, a2, a3, a4, a5)); |
| 372 |
} |
| 373 |
|
| 374 |
template <typename U1, typename T1> |
| 375 |
EventId RealtimeSimulatorExtension::ScheduleReal (Time const &time, void (*f) (U1), T1 a1) |
| 376 |
{ |
| 377 |
return ScheduleReal (time, Simulator::MakeEvent (f, a1)); |
| 378 |
} |
| 379 |
|
| 380 |
template <typename U1, typename U2, |
| 381 |
typename T1, typename T2> |
| 382 |
EventId RealtimeSimulatorExtension::ScheduleReal (Time const &time, void (*f) (U1,U2), T1 a1, T2 a2) |
| 383 |
{ |
| 384 |
return ScheduleReal (time, Simulator::MakeEvent (f, a1, a2)); |
| 385 |
} |
| 386 |
|
| 387 |
template <typename U1, typename U2, typename U3, |
| 388 |
typename T1, typename T2, typename T3> |
| 389 |
EventId RealtimeSimulatorExtension::ScheduleReal (Time const &time, void (*f) (U1,U2,U3), T1 a1, T2 a2, T3 a3) |
| 390 |
{ |
| 391 |
return ScheduleReal (time, Simulator::MakeEvent (f, a1, a2, a3)); |
| 392 |
} |
| 393 |
|
| 394 |
template <typename U1, typename U2, typename U3, typename U4, |
| 395 |
typename T1, typename T2, typename T3, typename T4> |
| 396 |
EventId RealtimeSimulatorExtension::ScheduleReal (Time const &time, void (*f) (U1,U2,U3,U4), T1 a1, T2 a2, T3 a3, T4 a4) |
| 397 |
{ |
| 398 |
return ScheduleReal (time, Simulator::MakeEvent (f, a1, a2, a3, a4)); |
| 399 |
} |
| 400 |
|
| 401 |
template <typename U1, typename U2, typename U3, typename U4, typename U5, |
| 402 |
typename T1, typename T2, typename T3, typename T4, typename T5> |
| 403 |
EventId RealtimeSimulatorExtension::ScheduleReal (Time const &time, void (*f) (U1,U2,U3,U4,U5), T1 a1, T2 a2, T3 a3, T4 a4, T5 a5) |
| 404 |
{ |
| 405 |
return ScheduleReal (time, Simulator::MakeEvent (f, a1, a2, a3, a4, a5)); |
| 406 |
} |
| 407 |
|
| 408 |
template <typename MEM, typename OBJ> |
| 409 |
EventId |
| 410 |
RealtimeSimulatorExtension::ScheduleRealNow (MEM mem_ptr, OBJ obj) |
| 411 |
{ |
| 412 |
return ScheduleRealNow (Simulator::MakeEvent (mem_ptr, obj)); |
| 413 |
} |
| 414 |
|
| 415 |
template <typename MEM, typename OBJ, |
| 416 |
typename T1> |
| 417 |
EventId |
| 418 |
RealtimeSimulatorExtension::ScheduleRealNow (MEM mem_ptr, OBJ obj, T1 a1) |
| 419 |
{ |
| 420 |
return ScheduleRealNow (Simulator::MakeEvent (mem_ptr, obj, a1)); |
| 421 |
} |
| 422 |
|
| 423 |
template <typename MEM, typename OBJ, |
| 424 |
typename T1, typename T2> |
| 425 |
EventId |
| 426 |
RealtimeSimulatorExtension::ScheduleRealNow (MEM mem_ptr, OBJ obj, T1 a1, T2 a2) |
| 427 |
{ |
| 428 |
return ScheduleRealNow (Simulator::MakeEvent (mem_ptr, obj, a1, a2)); |
| 429 |
} |
| 430 |
|
| 431 |
template <typename MEM, typename OBJ, |
| 432 |
typename T1, typename T2, typename T3> |
| 433 |
EventId |
| 434 |
RealtimeSimulatorExtension::ScheduleRealNow (MEM mem_ptr, OBJ obj, T1 a1, T2 a2, T3 a3) |
| 435 |
{ |
| 436 |
return ScheduleRealNow (Simulator::MakeEvent (mem_ptr, obj, a1, a2, a3)); |
| 437 |
} |
| 438 |
|
| 439 |
template <typename MEM, typename OBJ, |
| 440 |
typename T1, typename T2, typename T3, typename T4> |
| 441 |
EventId |
| 442 |
RealtimeSimulatorExtension::ScheduleRealNow (MEM mem_ptr, OBJ obj, T1 a1, T2 a2, T3 a3, T4 a4) |
| 443 |
{ |
| 444 |
return ScheduleRealNow (Simulator::MakeEvent (mem_ptr, obj, a1, a2, a3, a4)); |
| 445 |
} |
| 446 |
|
| 447 |
template <typename MEM, typename OBJ, |
| 448 |
typename T1, typename T2, typename T3, typename T4, typename T5> |
| 449 |
EventId |
| 450 |
RealtimeSimulatorExtension::ScheduleRealNow (MEM mem_ptr, OBJ obj, |
| 451 |
T1 a1, T2 a2, T3 a3, T4 a4, T5 a5) |
| 452 |
{ |
| 453 |
return ScheduleRealNow (Simulator::MakeEvent (mem_ptr, obj, a1, a2, a3, a4, a5)); |
| 454 |
} |
| 455 |
|
| 456 |
template <typename U1, |
| 457 |
typename T1> |
| 458 |
EventId |
| 459 |
RealtimeSimulatorExtension::ScheduleRealNow (void (*f) (U1), T1 a1) |
| 460 |
{ |
| 461 |
return ScheduleRealNow (Simulator::MakeEvent (f, a1)); |
| 462 |
} |
| 463 |
|
| 464 |
template <typename U1, typename U2, |
| 465 |
typename T1, typename T2> |
| 466 |
EventId |
| 467 |
RealtimeSimulatorExtension::ScheduleRealNow (void (*f) (U1,U2), T1 a1, T2 a2) |
| 468 |
{ |
| 469 |
return ScheduleRealNow (Simulator::MakeEvent (f, a1, a2)); |
| 470 |
} |
| 471 |
|
| 472 |
template <typename U1, typename U2, typename U3, |
| 473 |
typename T1, typename T2, typename T3> |
| 474 |
EventId |
| 475 |
RealtimeSimulatorExtension::ScheduleRealNow (void (*f) (U1,U2,U3), T1 a1, T2 a2, T3 a3) |
| 476 |
{ |
| 477 |
return ScheduleRealNow (Simulator::MakeEvent (f, a1, a2, a3)); |
| 478 |
} |
| 479 |
|
| 480 |
template <typename U1, typename U2, typename U3, typename U4, |
| 481 |
typename T1, typename T2, typename T3, typename T4> |
| 482 |
EventId |
| 483 |
RealtimeSimulatorExtension::ScheduleRealNow (void (*f) (U1,U2,U3,U4), T1 a1, T2 a2, T3 a3, T4 a4) |
| 484 |
{ |
| 485 |
return ScheduleRealNow (Simulator::MakeEvent (f, a1, a2, a3, a4)); |
| 486 |
} |
| 487 |
|
| 488 |
template <typename U1, typename U2, typename U3, typename U4, typename U5, |
| 489 |
typename T1, typename T2, typename T3, typename T4, typename T5> |
| 490 |
EventId |
| 491 |
RealtimeSimulatorExtension::ScheduleRealNow (void (*f) (U1,U2,U3,U4,U5), T1 a1, T2 a2, T3 a3, T4 a4, T5 a5) |
| 492 |
{ |
| 493 |
return ScheduleRealNow (Simulator::MakeEvent (f, a1, a2, a3, a4, a5)); |
| 494 |
} |
| 495 |
|
| 496 |
}; // namespace ns3 |
| 497 |
|
| 498 |
#endif /* REALTIME_SIMULATOR_H */ |