|
|
| 191 |
*/ |
191 |
*/ |
| 192 |
NO_CONTEXT = 0xffffffff |
192 |
NO_CONTEXT = 0xffffffff |
| 193 |
}; |
193 |
}; |
| 194 |
|
194 |
|
| 195 |
/** |
195 |
/** |
| 196 |
* @name Schedule events (in the same context) to run at a future time. |
196 |
* @name Schedule events (in the same context) to run at a future time. |
| 197 |
*/ |
197 |
*/ |
|
|
| 202 |
* for the current simulation time plus the @p delay passed as a |
202 |
* for the current simulation time plus the @p delay passed as a |
| 203 |
* parameter. |
203 |
* parameter. |
| 204 |
* |
204 |
* |
| 205 |
* When the event expires (when it becomes due to be run), the |
205 |
* @tparam Ts @deduced Argument types. |
| 206 |
* input method will be invoked on the input object. |
|
|
| 207 |
* |
| 208 |
* @tparam MEM @deduced Class method function signature type. |
| 209 |
* @tparam OBJ @deduced Class type of the object. |
| 210 |
* @param [in] delay The relative expiration time of the event. |
206 |
* @param [in] delay The relative expiration time of the event. |
| 211 |
* @param [in] mem_ptr Member method pointer to invoke |
207 |
* @param [in] args Arguments to pass to MakeEvent. |
| 212 |
* @param [in] obj The object on which to invoke the member method |
|
|
| 213 |
* @returns The id for the scheduled event. |
208 |
* @returns The id for the scheduled event. |
| 214 |
*/ |
209 |
*/ |
| 215 |
template <typename MEM, typename OBJ> |
210 |
template <typename... Ts> |
| 216 |
static EventId Schedule (Time const &delay, MEM mem_ptr, OBJ obj); |
211 |
static EventId Schedule (Time const &delay, Ts&&... args); |
| 217 |
|
212 |
|
| 218 |
/** |
213 |
/** |
| 219 |
* @see Schedule(const Time&,MEM,OBJ) |
214 |
* |
| 220 |
* @tparam MEM @deduced Class method function signature type. |
|
|
| 221 |
* @tparam OBJ @deduced Class type of the object. |
| 222 |
* @tparam T1 @deduced Type of first argument. |
| 223 |
* @param [in] delay The relative expiration time of the event. |
| 224 |
* @param [in] mem_ptr Member method pointer to invoke |
| 225 |
* @param [in] obj The object on which to invoke the member method |
| 226 |
* @param [in] a1 The first argument to pass to the invoked method |
| 227 |
* @returns The id for the scheduled event. |
| 228 |
*/ |
| 229 |
template <typename MEM, typename OBJ, typename T1> |
| 230 |
static EventId Schedule (Time const &delay, MEM mem_ptr, OBJ obj, T1 a1); |
| 231 |
|
| 232 |
/** |
| 233 |
* @see Schedule(const Time&,MEM,OBJ) |
| 234 |
* @tparam MEM @deduced Class method function signature type. |
| 235 |
* @tparam OBJ @deduced Class type of the object. |
| 236 |
* @tparam T1 @deduced Type of first argument. |
| 237 |
* @tparam T2 @deduced Type of second argument. |
| 238 |
* @param [in] delay The relative expiration time of the event. |
| 239 |
* @param [in] mem_ptr Member method pointer to invoke |
| 240 |
* @param [in] obj The object on which to invoke the member method |
| 241 |
* @param [in] a1 The first argument to pass to the invoked method |
| 242 |
* @param [in] a2 The second argument to pass to the invoked method |
| 243 |
* @returns The id for the scheduled event. |
| 244 |
*/ |
| 245 |
template <typename MEM, typename OBJ, typename T1, typename T2> |
| 246 |
static EventId Schedule (Time const &delay, MEM mem_ptr, OBJ obj, T1 a1, T2 a2); |
| 247 |
|
| 248 |
/** |
| 249 |
* @see Schedule(const Time&,MEM,OBJ) |
| 250 |
* @tparam MEM @deduced Class method function signature type. |
| 251 |
* @tparam OBJ @deduced Class type of the object. |
| 252 |
* @tparam T1 @deduced Type of first argument. |
| 253 |
* @tparam T2 @deduced Type of second argument. |
| 254 |
* @tparam T3 @deduced Type of third argument. |
| 255 |
* @param [in] delay The relative expiration time of the event. |
| 256 |
* @param [in] mem_ptr Member method pointer to invoke |
| 257 |
* @param [in] obj The object on which to invoke the member method |
| 258 |
* @param [in] a1 The first argument to pass to the invoked method |
| 259 |
* @param [in] a2 The second argument to pass to the invoked method |
| 260 |
* @param [in] a3 The third argument to pass to the invoked method |
| 261 |
* @returns The id for the scheduled event. |
| 262 |
*/ |
| 263 |
template <typename MEM, typename OBJ, |
| 264 |
typename T1, typename T2, typename T3> |
| 265 |
static EventId Schedule (Time const &delay, MEM mem_ptr, OBJ obj, T1 a1, T2 a2, T3 a3); |
| 266 |
|
| 267 |
/** |
| 268 |
* @see Schedule(const Time&,MEM,OBJ) |
| 269 |
* @tparam MEM @deduced Class method function signature type. |
| 270 |
* @tparam OBJ @deduced Class type of the object. |
| 271 |
* @tparam T1 @deduced Type of first argument. |
| 272 |
* @tparam T2 @deduced Type of second argument. |
| 273 |
* @tparam T3 @deduced Type of third argument. |
| 274 |
* @tparam T4 @deduced Type of fourth argument. |
| 275 |
* @param [in] delay The relative expiration time of the event. |
| 276 |
* @param [in] mem_ptr Member method pointer to invoke |
| 277 |
* @param [in] obj The object on which to invoke the member method |
| 278 |
* @param [in] a1 The first argument to pass to the invoked method |
| 279 |
* @param [in] a2 The second argument to pass to the invoked method |
| 280 |
* @param [in] a3 The third argument to pass to the invoked method |
| 281 |
* @param [in] a4 The fourth argument to pass to the invoked method |
| 282 |
* @returns The id for the scheduled event. |
| 283 |
*/ |
| 284 |
template <typename MEM, typename OBJ, |
| 285 |
typename T1, typename T2, typename T3, typename T4> |
| 286 |
static EventId Schedule (Time const &delay, MEM mem_ptr, OBJ obj, T1 a1, T2 a2, T3 a3, T4 a4); |
| 287 |
|
| 288 |
/** |
| 289 |
* @see Schedule(const Time&,MEM,OBJ) |
| 290 |
* @tparam MEM @deduced Class method function signature type. |
| 291 |
* @tparam OBJ @deduced Class type of the object. |
| 292 |
* @tparam T1 @deduced Type of first argument. |
| 293 |
* @tparam T2 @deduced Type of second argument. |
| 294 |
* @tparam T3 @deduced Type of third argument. |
| 295 |
* @tparam T4 @deduced Type of fourth argument. |
| 296 |
* @tparam T5 @deduced Type of fifth argument. |
| 297 |
* @param [in] delay The relative expiration time of the event. |
| 298 |
* @param [in] mem_ptr Member method pointer to invoke |
| 299 |
* @param [in] obj The object on which to invoke the member method |
| 300 |
* @param [in] a1 The first argument to pass to the invoked method |
| 301 |
* @param [in] a2 The second argument to pass to the invoked method |
| 302 |
* @param [in] a3 The third argument to pass to the invoked method |
| 303 |
* @param [in] a4 The fourth argument to pass to the invoked method |
| 304 |
* @param [in] a5 The fifth argument to pass to the invoked method |
| 305 |
* @returns The id for the scheduled event. |
| 306 |
*/ |
| 307 |
template <typename MEM, typename OBJ, |
| 308 |
typename T1, typename T2, typename T3, typename T4, typename T5> |
| 309 |
static EventId Schedule (Time const &delay, MEM mem_ptr, OBJ obj, |
| 310 |
T1 a1, T2 a2, T3 a3, T4 a4, T5 a5); |
| 311 |
|
| 312 |
/** |
| 313 |
* @param time the relative expiration time of the event. |
| 314 |
* @param mem_ptr member method pointer to invoke |
| 315 |
* @param obj the object on which to invoke the member method |
| 316 |
* @param a1 the first argument to pass to the invoked method |
| 317 |
* @param a2 the second argument to pass to the invoked method |
| 318 |
* @param a3 the third argument to pass to the invoked method |
| 319 |
* @param a4 the fourth argument to pass to the invoked method |
| 320 |
* @param a5 the fifth argument to pass to the invoked method |
| 321 |
* @param a6 the sixth argument to pass to the invoked method |
| 322 |
* @returns an id for the scheduled event. |
| 323 |
*/ |
| 324 |
template <typename MEM, typename OBJ, |
| 325 |
typename T1, typename T2, typename T3, typename T4, typename T5, typename T6> |
| 326 |
static EventId Schedule (Time const &time, MEM mem_ptr, OBJ obj, |
| 327 |
T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6); |
| 328 |
|
| 329 |
/** |
| 330 |
* Schedule an event to expire after @p delay. |
215 |
* Schedule an event to expire after @p delay. |
| 331 |
* This can be thought of as scheduling an event |
216 |
* This can be thought of as scheduling an event |
| 332 |
* for the current simulation time plus the @p delay passed as a |
217 |
* for the current simulation time plus the @p delay passed as a |
|
|
| 334 |
* |
219 |
* |
| 335 |
* When the event expires (when it becomes due to be run), the |
220 |
* When the event expires (when it becomes due to be run), the |
| 336 |
* function will be invoked with any supplied arguments. |
221 |
* function will be invoked with any supplied arguments. |
|
|
222 |
* |
| 223 |
* @tparam Us @deduced Formal function argument types. |
| 224 |
* @tparam Ts @deduced Actual function argument types. |
| 337 |
* @param [in] delay The relative expiration time of the event. |
225 |
* @param [in] delay The relative expiration time of the event. |
| 338 |
* @param [in] f The function to invoke |
226 |
* @param [in] f The function to invoke. |
|
|
227 |
* @param [in] args Arguments to pass to the invoked function. |
| 339 |
* @returns The id for the scheduled event. |
228 |
* @returns The id for the scheduled event. |
| 340 |
*/ |
229 |
*/ |
| 341 |
static EventId Schedule (Time const &delay, void (*f)(void)); |
230 |
template <typename... Us, typename... Ts> |
| 342 |
|
231 |
static EventId Schedule (Time const &delay, void (*f)(Us...), Ts&&... args); |
| 343 |
/** |
|
|
| 344 |
* @see Schedule(const Time&,(*)()) |
| 345 |
* @tparam U1 @deduced Formal type of the first argument to the function. |
| 346 |
* @tparam T1 @deduced Actual type of the first argument. |
| 347 |
* @param [in] delay The relative expiration time of the event. |
| 348 |
* @param [in] f The function to invoke |
| 349 |
* @param [in] a1 The first argument to pass to the function to invoke. |
| 350 |
* @returns The id for the scheduled event. |
| 351 |
*/ |
| 352 |
template <typename U1, typename T1> |
| 353 |
static EventId Schedule (Time const &delay, void (*f)(U1), T1 a1); |
| 354 |
|
| 355 |
/** |
| 356 |
* @see Schedule(const Time&,(*)()) |
| 357 |
* @tparam U1 @deduced Formal type of the first argument to the function. |
| 358 |
* @tparam U2 @deduced Formal type of the second argument to the function. |
| 359 |
* @tparam T1 @deduced Actual type of the first argument. |
| 360 |
* @tparam T2 @deduced Actual type of the second argument. |
| 361 |
* @param [in] delay The relative expiration time of the event. |
| 362 |
* @param [in] f The function to invoke |
| 363 |
* @param [in] a1 The first argument to pass to the function to invoke |
| 364 |
* @param [in] a2 The second argument to pass to the function to invoke |
| 365 |
* @returns The id for the scheduled event. |
| 366 |
*/ |
| 367 |
template <typename U1, typename U2, |
| 368 |
typename T1, typename T2> |
| 369 |
static EventId Schedule (Time const &delay, void (*f)(U1,U2), T1 a1, T2 a2); |
| 370 |
|
| 371 |
/** |
| 372 |
* @see Schedule(const Time&,void(*)()) |
| 373 |
* @tparam U1 @deduced Formal type of the first argument to the function. |
| 374 |
* @tparam U2 @deduced Formal type of the second argument to the function. |
| 375 |
* @tparam U3 @deduced Formal type of the third argument to the function. |
| 376 |
* @tparam T1 @deduced Actual type of the first argument. |
| 377 |
* @tparam T2 @deduced Actual type of the second argument. |
| 378 |
* @tparam T3 @deduced Actual type of the third argument. |
| 379 |
* @param [in] delay The relative expiration time of the event. |
| 380 |
* @param [in] f The function to invoke |
| 381 |
* @param [in] a1 The first argument to pass to the function to invoke |
| 382 |
* @param [in] a2 The second argument to pass to the function to invoke |
| 383 |
* @param [in] a3 The third argument to pass to the function to invoke |
| 384 |
* @returns The id for the scheduled event. |
| 385 |
*/ |
| 386 |
template <typename U1, typename U2, typename U3, |
| 387 |
typename T1, typename T2, typename T3> |
| 388 |
static EventId Schedule (Time const &delay, void (*f)(U1,U2,U3), T1 a1, T2 a2, T3 a3); |
| 389 |
|
| 390 |
/** |
| 391 |
* @see Schedule(const Time&,(*)(void)) |
| 392 |
* @tparam U1 @deduced Formal type of the first argument to the function. |
| 393 |
* @tparam U2 @deduced Formal type of the second argument to the function. |
| 394 |
* @tparam U3 @deduced Formal type of the third argument to the function. |
| 395 |
* @tparam U4 @deduced Formal type of the fourth argument to the function. |
| 396 |
* @tparam T1 @deduced Actual type of the first argument. |
| 397 |
* @tparam T2 @deduced Actual type of the second argument. |
| 398 |
* @tparam T3 @deduced Actual type of the third argument. |
| 399 |
* @tparam T4 @deduced Actual type of the fourth argument. |
| 400 |
* @param [in] delay The relative expiration time of the event. |
| 401 |
* @param [in] f The function to invoke |
| 402 |
* @param [in] a1 The first argument to pass to the function to invoke |
| 403 |
* @param [in] a2 The second argument to pass to the function to invoke |
| 404 |
* @param [in] a3 The third argument to pass to the function to invoke |
| 405 |
* @param [in] a4 The fourth argument to pass to the function to invoke |
| 406 |
* @returns The id for the scheduled event. |
| 407 |
*/ |
| 408 |
template <typename U1, typename U2, typename U3, typename U4, |
| 409 |
typename T1, typename T2, typename T3, typename T4> |
| 410 |
static EventId Schedule (Time const &delay, void (*f)(U1,U2,U3,U4), T1 a1, T2 a2, T3 a3, T4 a4); |
| 411 |
|
| 412 |
/** |
| 413 |
* @see Schedule(const Time&,void(*)(void)) |
| 414 |
* @tparam U1 @deduced Formal type of the first argument to the function. |
| 415 |
* @tparam U2 @deduced Formal type of the second argument to the function. |
| 416 |
* @tparam U3 @deduced Formal type of the third argument to the function. |
| 417 |
* @tparam U4 @deduced Formal type of the fourth argument to the function. |
| 418 |
* @tparam U5 @deduced Formal type of the fifth argument to the function. |
| 419 |
* @tparam T1 @deduced Actual type of the first argument. |
| 420 |
* @tparam T2 @deduced Actual type of the second argument. |
| 421 |
* @tparam T3 @deduced Actual type of the third argument. |
| 422 |
* @tparam T4 @deduced Actual type of the fourth argument. |
| 423 |
* @tparam T5 @deduced Actual type of the fifth argument. |
| 424 |
* @param [in] delay The relative expiration time of the event. |
| 425 |
* @param [in] f The function to invoke |
| 426 |
* @param [in] a1 The first argument to pass to the function to invoke |
| 427 |
* @param [in] a2 The second argument to pass to the function to invoke |
| 428 |
* @param [in] a3 The third argument to pass to the function to invoke |
| 429 |
* @param [in] a4 The fourth argument to pass to the function to invoke |
| 430 |
* @param [in] a5 The fifth argument to pass to the function to invoke |
| 431 |
* @returns The id for the scheduled event. |
| 432 |
*/ |
| 433 |
template <typename U1, typename U2, typename U3, typename U4, typename U5, |
| 434 |
typename T1, typename T2, typename T3, typename T4, typename T5> |
| 435 |
static EventId Schedule (Time const &delay, void (*f)(U1,U2,U3,U4,U5), T1 a1, T2 a2, T3 a3, T4 a4, T5 a5); |
| 436 |
|
| 437 |
/** |
| 438 |
* @param time the relative expiration time of the event. |
| 439 |
* @param f the function to invoke |
| 440 |
* @param a1 the first argument to pass to the function to invoke |
| 441 |
* @param a2 the second argument to pass to the function to invoke |
| 442 |
* @param a3 the third argument to pass to the function to invoke |
| 443 |
* @param a4 the fourth argument to pass to the function to invoke |
| 444 |
* @param a5 the fifth argument to pass to the function to invoke |
| 445 |
* @param a6 the sixth argument to pass to the function to invoke |
| 446 |
* @returns an id for the scheduled event. |
| 447 |
*/ |
| 448 |
template <typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, |
| 449 |
typename T1, typename T2, typename T3, typename T4, typename T5, typename T6> |
| 450 |
static EventId Schedule (Time const &time, void (*f)(U1,U2,U3,U4,U5,U6), T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6); |
| 451 |
|
| 452 |
|
| 453 |
/** @} */ |
232 |
/** @} */ |
| 454 |
|
233 |
|
| 455 |
/** |
234 |
/** |
|
|
| 463 |
* A context of 0xffffffff means no context is specified. |
242 |
* A context of 0xffffffff means no context is specified. |
| 464 |
* This method is thread-safe: it can be called from any thread. |
243 |
* This method is thread-safe: it can be called from any thread. |
| 465 |
* |
244 |
* |
| 466 |
* @see Schedule(const Time&,MEM,OBJ) |
245 |
* @tparam Ts @deduced Argument types. |
| 467 |
* @tparam MEM @deduced Class method function signature type. |
|
|
| 468 |
* @tparam OBJ @deduced Class type of the object. |
| 469 |
* @param [in] context User-specified context parameter |
246 |
* @param [in] context User-specified context parameter |
| 470 |
* @param [in] delay The relative expiration time of the event. |
247 |
* @param [in] delay The relative expiration time of the event. |
| 471 |
* @param [in] mem_ptr Member method pointer to invoke |
248 |
* @param [in] args Arguments to pass to MakeEvent. |
| 472 |
* @param [in] obj The object on which to invoke the member method |
|
|
| 473 |
*/ |
249 |
*/ |
| 474 |
template <typename MEM, typename OBJ> |
250 |
template <typename... Ts> |
| 475 |
static void ScheduleWithContext (uint32_t context, Time const &delay, MEM mem_ptr, OBJ obj); |
251 |
static void ScheduleWithContext (uint32_t context, Time const &delay, Ts&&... args); |
| 476 |
|
252 |
|
| 477 |
/** |
253 |
/** |
| 478 |
* @see ScheduleWithContext(uint32_t,const Time&,MEM,OBJ) |
|
|
| 479 |
* @tparam MEM @deduced Class method function signature type. |
| 480 |
* @tparam OBJ @deduced Class type of the object. |
| 481 |
* @tparam T1 @deduced Type of first argument. |
| 482 |
* @param [in] context User-specified context parameter |
| 483 |
* @param [in] delay The relative expiration time of the event. |
| 484 |
* @param [in] mem_ptr Member method pointer to invoke |
| 485 |
* @param [in] obj The object on which to invoke the member method |
| 486 |
* @param [in] a1 The first argument to pass to the invoked method |
| 487 |
*/ |
| 488 |
template <typename MEM, typename OBJ, typename T1> |
| 489 |
static void ScheduleWithContext (uint32_t context, Time const &delay, MEM mem_ptr, OBJ obj, T1 a1); |
| 490 |
|
| 491 |
/** |
| 492 |
* @see ScheduleWithContext(uint32_t,const Time&,MEM,OBJ) |
| 493 |
* @tparam MEM @deduced Class method function signature type. |
| 494 |
* @tparam OBJ @deduced Class type of the object. |
| 495 |
* @tparam T1 @deduced Type of first argument. |
| 496 |
* @tparam T2 @deduced Type of second argument. |
| 497 |
* @param [in] context User-specified context parameter |
| 498 |
* @param [in] delay The relative expiration time of the event. |
| 499 |
* @param [in] mem_ptr Member method pointer to invoke |
| 500 |
* @param [in] obj The object on which to invoke the member method |
| 501 |
* @param [in] a1 The first argument to pass to the invoked method |
| 502 |
* @param [in] a2 The second argument to pass to the invoked method |
| 503 |
*/ |
| 504 |
template <typename MEM, typename OBJ, typename T1, typename T2> |
| 505 |
static void ScheduleWithContext (uint32_t context, Time const &delay, MEM mem_ptr, OBJ obj, T1 a1, T2 a2); |
| 506 |
|
| 507 |
/** |
| 508 |
* @see ScheduleWithContext(uint32_t,const Time&,MEM,OBJ) |
| 509 |
* @tparam MEM @deduced Class method function signature type. |
| 510 |
* @tparam OBJ @deduced Class type of the object. |
| 511 |
* @tparam T1 @deduced Type of first argument. |
| 512 |
* @tparam T2 @deduced Type of second argument. |
| 513 |
* @tparam T3 @deduced Type of third argument. |
| 514 |
* @param [in] context User-specified context parameter |
| 515 |
* @param [in] delay The relative expiration time of the event. |
| 516 |
* @param [in] mem_ptr Member method pointer to invoke |
| 517 |
* @param [in] obj The object on which to invoke the member method |
| 518 |
* @param [in] a1 The first argument to pass to the invoked method |
| 519 |
* @param [in] a2 The second argument to pass to the invoked method |
| 520 |
* @param [in] a3 The third argument to pass to the invoked method |
| 521 |
*/ |
| 522 |
template <typename MEM, typename OBJ, |
| 523 |
typename T1, typename T2, typename T3> |
| 524 |
static void ScheduleWithContext (uint32_t context, Time const &delay, MEM mem_ptr, OBJ obj, T1 a1, T2 a2, T3 a3); |
| 525 |
|
| 526 |
/** |
| 527 |
* @see ScheduleWithContext(uint32_t,const Time&,MEM,OBJ) |
| 528 |
* @tparam MEM @deduced Class method function signature type. |
| 529 |
* @tparam OBJ @deduced Class type of the object. |
| 530 |
* @tparam T1 @deduced Type of first argument. |
| 531 |
* @tparam T2 @deduced Type of second argument. |
| 532 |
* @tparam T3 @deduced Type of third argument. |
| 533 |
* @tparam T4 @deduced Type of fourth argument. |
| 534 |
* @param [in] context User-specified context parameter |
| 535 |
* @param [in] delay The relative expiration time of the event. |
| 536 |
* @param [in] mem_ptr Member method pointer to invoke |
| 537 |
* @param [in] obj The object on which to invoke the member method |
| 538 |
* @param [in] a1 The first argument to pass to the invoked method |
| 539 |
* @param [in] a2 The second argument to pass to the invoked method |
| 540 |
* @param [in] a3 The third argument to pass to the invoked method |
| 541 |
* @param [in] a4 The fourth argument to pass to the invoked method |
| 542 |
*/ |
| 543 |
template <typename MEM, typename OBJ, |
| 544 |
typename T1, typename T2, typename T3, typename T4> |
| 545 |
static void ScheduleWithContext (uint32_t context, Time const &delay, MEM mem_ptr, OBJ obj, T1 a1, T2 a2, T3 a3, T4 a4); |
| 546 |
|
| 547 |
/** |
| 548 |
* @see ScheduleWithContext(uint32_t,const Time&,MEM,OBJ) |
| 549 |
* @tparam MEM @deduced Class method function signature type. |
| 550 |
* @tparam OBJ @deduced Class type of the object. |
| 551 |
* @tparam T1 @deduced Type of first argument. |
| 552 |
* @tparam T2 @deduced Type of second argument. |
| 553 |
* @tparam T3 @deduced Type of third argument. |
| 554 |
* @tparam T4 @deduced Type of fourth argument. |
| 555 |
* @tparam T5 @deduced Type of fifth argument. |
| 556 |
* @param [in] context User-specified context parameter |
| 557 |
* @param [in] delay The relative expiration time of the event. |
| 558 |
* @param [in] mem_ptr Member method pointer to invoke |
| 559 |
* @param [in] obj The object on which to invoke the member method |
| 560 |
* @param [in] a1 The first argument to pass to the invoked method |
| 561 |
* @param [in] a2 The second argument to pass to the invoked method |
| 562 |
* @param [in] a3 The third argument to pass to the invoked method |
| 563 |
* @param [in] a4 The fourth argument to pass to the invoked method |
| 564 |
* @param [in] a5 The fifth argument to pass to the invoked method |
| 565 |
*/ |
| 566 |
template <typename MEM, typename OBJ, |
| 567 |
typename T1, typename T2, typename T3, typename T4, typename T5> |
| 568 |
static void ScheduleWithContext (uint32_t context, Time const &delay, MEM mem_ptr, OBJ obj, |
| 569 |
T1 a1, T2 a2, T3 a3, T4 a4, T5 a5); |
| 570 |
|
| 571 |
/** |
| 572 |
* This method is thread-safe: it can be called from any thread. |
| 573 |
* |
| 574 |
* @param time the relative expiration time of the event. |
| 575 |
* @param context user-specified context parameter |
| 576 |
* @param mem_ptr member method pointer to invoke |
| 577 |
* @param obj the object on which to invoke the member method |
| 578 |
* @param a1 the first argument to pass to the invoked method |
| 579 |
* @param a2 the second argument to pass to the invoked method |
| 580 |
* @param a3 the third argument to pass to the invoked method |
| 581 |
* @param a4 the fourth argument to pass to the invoked method |
| 582 |
* @param a5 the fifth argument to pass to the invoked method |
| 583 |
* @param a6 the sixth argument to pass to the invoked method |
| 584 |
*/ |
| 585 |
template <typename MEM, typename OBJ, |
| 586 |
typename T1, typename T2, typename T3, typename T4, typename T5, typename T6> |
| 587 |
static void ScheduleWithContext (uint32_t context, Time const &time, MEM mem_ptr, OBJ obj, |
| 588 |
T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6); |
| 589 |
|
| 590 |
/** |
| 591 |
* Schedule an event with the given context. |
254 |
* Schedule an event with the given context. |
| 592 |
* A context of 0xffffffff means no context is specified. |
255 |
* A context of 0xffffffff means no context is specified. |
| 593 |
* This method is thread-safe: it can be called from any thread. |
256 |
* This method is thread-safe: it can be called from any thread. |
| 594 |
* |
257 |
* |
| 595 |
* When the event expires (when it becomes due to be run), the |
258 |
* @tparam Us @deduced Formal function argument types. |
| 596 |
* function will be invoked with any supplied arguments. |
259 |
* @tparam Ts @deduced Actual function argument types. |
| 597 |
* |
|
|
| 598 |
* This method is thread-safe: it can be called from any thread. |
| 599 |
* @param [in] context User-specified context parameter |
260 |
* @param [in] context User-specified context parameter |
| 600 |
* @param [in] delay The relative expiration time of the event. |
261 |
* @param [in] delay The relative expiration time of the event. |
| 601 |
* @param [in] f The function to invoke |
262 |
* @param [in] f The function to invoke. |
|
|
263 |
* @param [in] args Arguments to pass to the invoked function. |
| 602 |
*/ |
264 |
*/ |
| 603 |
static void ScheduleWithContext (uint32_t context, Time const &delay, void (*f)(void)); |
265 |
template <typename... Us, typename... Ts> |
|
|
266 |
static void ScheduleWithContext (uint32_t context, Time const &delay, void (*f)(Us...), Ts&&... args); |
| 267 |
/** @} */ |
| 604 |
|
268 |
|
| 605 |
/** |
269 |
/** |
| 606 |
* @see ScheduleWithContext(uint32_t,const Time&,(*)()) |
|
|
| 607 |
* @tparam U1 @deduced Formal type of the first argument to the function. |
| 608 |
* @tparam T1 @deduced Actual type of the first argument. |
| 609 |
* @param [in] context User-specified context parameter |
| 610 |
* @param [in] delay The relative expiration time of the event. |
| 611 |
* @param [in] f The function to invoke |
| 612 |
* @param [in] a1 The first argument to pass to the function to invoke |
| 613 |
*/ |
| 614 |
template <typename U1, |
| 615 |
typename T1> |
| 616 |
static void ScheduleWithContext (uint32_t context, Time const &delay, void (*f)(U1), T1 a1); |
| 617 |
|
| 618 |
/** |
| 619 |
* @see ScheduleWithContext(uint32_t,const Time&,(*)()) |
| 620 |
* @tparam U1 @deduced Formal type of the first argument to the function. |
| 621 |
* @tparam U2 @deduced Formal type of the second argument to the function. |
| 622 |
* @tparam T1 @deduced Actual type of the first argument. |
| 623 |
* @tparam T2 @deduced Actual type of the second argument. |
| 624 |
* @param [in] context User-specified context parameter |
| 625 |
* @param [in] delay The relative expiration time of the event. |
| 626 |
* @param [in] f The function to invoke |
| 627 |
* @param [in] a1 The first argument to pass to the function to invoke |
| 628 |
* @param [in] a2 The second argument to pass to the function to invoke |
| 629 |
*/ |
| 630 |
template <typename U1, typename U2, |
| 631 |
typename T1, typename T2> |
| 632 |
static void ScheduleWithContext (uint32_t context, Time const &delay, void (*f)(U1,U2), T1 a1, T2 a2); |
| 633 |
|
| 634 |
/** |
| 635 |
* @see ScheduleWithContext(uint32_t,const Time&,(*)()) |
| 636 |
* @tparam U1 @deduced Formal type of the first argument to the function. |
| 637 |
* @tparam U2 @deduced Formal type of the second argument to the function. |
| 638 |
* @tparam U3 @deduced Formal type of the third argument to the function. |
| 639 |
* @tparam T1 @deduced Actual type of the first argument. |
| 640 |
* @tparam T2 @deduced Actual type of the second argument. |
| 641 |
* @tparam T3 @deduced Actual type of the third argument. |
| 642 |
* @param [in] context User-specified context parameter |
| 643 |
* @param [in] delay The relative expiration time of the event. |
| 644 |
* @param [in] f The function to invoke |
| 645 |
* @param [in] a1 The first argument to pass to the function to invoke |
| 646 |
* @param [in] a2 The second argument to pass to the function to invoke |
| 647 |
* @param [in] a3 The third argument to pass to the function to invoke |
| 648 |
*/ |
| 649 |
template <typename U1, typename U2, typename U3, |
| 650 |
typename T1, typename T2, typename T3> |
| 651 |
static void ScheduleWithContext (uint32_t context, Time const &delay, void (*f)(U1,U2,U3), T1 a1, T2 a2, T3 a3); |
| 652 |
|
| 653 |
/** |
| 654 |
* @see ScheduleWithContext(uint32_t,const Time&,(*)()) |
| 655 |
* @tparam U1 @deduced Formal type of the first argument to the function. |
| 656 |
* @tparam U2 @deduced Formal type of the second argument to the function. |
| 657 |
* @tparam U3 @deduced Formal type of the third argument to the function. |
| 658 |
* @tparam U4 @deduced Formal type of the fourth argument to the function. |
| 659 |
* @tparam T1 @deduced Actual type of the first argument. |
| 660 |
* @tparam T2 @deduced Actual type of the second argument. |
| 661 |
* @tparam T3 @deduced Actual type of the third argument. |
| 662 |
* @tparam T4 @deduced Actual type of the fourth argument. |
| 663 |
* @param [in] context User-specified context parameter |
| 664 |
* @param [in] delay The relative expiration time of the event. |
| 665 |
* @param [in] f The function to invoke |
| 666 |
* @param [in] a1 The first argument to pass to the function to invoke |
| 667 |
* @param [in] a2 The second argument to pass to the function to invoke |
| 668 |
* @param [in] a3 The third argument to pass to the function to invoke |
| 669 |
* @param [in] a4 The fourth argument to pass to the function to invoke |
| 670 |
*/ |
| 671 |
template <typename U1, typename U2, typename U3, typename U4, |
| 672 |
typename T1, typename T2, typename T3, typename T4> |
| 673 |
static void ScheduleWithContext (uint32_t context, Time const &delay, void (*f)(U1,U2,U3,U4), T1 a1, T2 a2, T3 a3, T4 a4); |
| 674 |
|
| 675 |
/** |
| 676 |
* @see ScheduleWithContext(uint32_t,const Time&,(*)()) |
| 677 |
* @tparam U1 @deduced Formal type of the first argument to the function. |
| 678 |
* @tparam U2 @deduced Formal type of the second argument to the function. |
| 679 |
* @tparam U3 @deduced Formal type of the third argument to the function. |
| 680 |
* @tparam U4 @deduced Formal type of the fourth argument to the function. |
| 681 |
* @tparam U5 @deduced Formal type of the fifth argument to the function. |
| 682 |
* @tparam T1 @deduced Actual type of the first argument. |
| 683 |
* @tparam T2 @deduced Actual type of the second argument. |
| 684 |
* @tparam T3 @deduced Actual type of the third argument. |
| 685 |
* @tparam T4 @deduced Actual type of the fourth argument. |
| 686 |
* @tparam T5 @deduced Actual type of the fifth argument. |
| 687 |
* @param [in] context User-specified context parameter |
| 688 |
* @param [in] delay The relative expiration time of the event. |
| 689 |
* @param [in] f The function to invoke |
| 690 |
* @param [in] a1 The first argument to pass to the function to invoke |
| 691 |
* @param [in] a2 The second argument to pass to the function to invoke |
| 692 |
* @param [in] a3 The third argument to pass to the function to invoke |
| 693 |
* @param [in] a4 The fourth argument to pass to the function to invoke |
| 694 |
* @param [in] a5 The fifth argument to pass to the function to invoke |
| 695 |
*/ |
| 696 |
template <typename U1, typename U2, typename U3, typename U4, typename U5, |
| 697 |
typename T1, typename T2, typename T3, typename T4, typename T5> |
| 698 |
static void ScheduleWithContext (uint32_t context, Time const &delay, void (*f)(U1,U2,U3,U4,U5), T1 a1, T2 a2, T3 a3, T4 a4, T5 a5); |
| 699 |
|
| 700 |
/** |
| 701 |
* This method is thread-safe: it can be called from any thread. |
| 702 |
* |
| 703 |
* @param time the relative expiration time of the event. |
| 704 |
* @param context user-specified context parameter |
| 705 |
* @param f the function to invoke |
| 706 |
* @param a1 the first argument to pass to the function to invoke |
| 707 |
* @param a2 the second argument to pass to the function to invoke |
| 708 |
* @param a3 the third argument to pass to the function to invoke |
| 709 |
* @param a4 the fourth argument to pass to the function to invoke |
| 710 |
* @param a5 the fifth argument to pass to the function to invoke |
| 711 |
* @param a6 the sixth argument to pass to the function to invoke |
| 712 |
*/ |
| 713 |
template <typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, |
| 714 |
typename T1, typename T2, typename T3, typename T4, typename T5, typename T6> |
| 715 |
static void ScheduleWithContext (uint32_t context, Time const &time, void (*f)(U1,U2,U3,U4,U5,U6), T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6); |
| 716 |
|
| 717 |
/** @} */ |
| 718 |
|
| 719 |
/** |
| 720 |
* @name Schedule events (in the same context) to run now. |
270 |
* @name Schedule events (in the same context) to run now. |
| 721 |
*/ |
271 |
*/ |
| 722 |
/** @{ */ |
272 |
/** @{ */ |
| 723 |
/** |
273 |
/** |
| 724 |
* Schedule an event to expire Now. All events scheduled to |
274 |
* Schedule an event to expire Now. All events scheduled to |
| 725 |
* to expire "Now" are scheduled FIFO, after all normal events |
275 |
* to expire "Now" are scheduled FIFO, after all normal events |
| 726 |
* have expired. |
276 |
* have expired. |
| 727 |
* |
277 |
* |
| 728 |
* @tparam MEM @deduced Class method function signature type. |
278 |
* @tparam Ts @deduced Actual function argument types. |
| 729 |
* @tparam OBJ @deduced Class type of the object. |
279 |
* @param [in] args Arguments to pass to the invoked function. |
| 730 |
* @param [in] mem_ptr Member method pointer to invoke |
|
|
| 731 |
* @param [in] obj The object on which to invoke the member method |
| 732 |
* @return The EventId of the scheduled event. |
280 |
* @return The EventId of the scheduled event. |
| 733 |
*/ |
281 |
*/ |
| 734 |
template <typename MEM, typename OBJ> |
282 |
template <typename... Ts> |
| 735 |
static EventId ScheduleNow (MEM mem_ptr, OBJ obj); |
283 |
static EventId ScheduleNow (Ts&&... args); |
| 736 |
|
284 |
|
| 737 |
/** |
285 |
/** |
| 738 |
* @see ScheduleNow(MEM,OBJ) |
286 |
* Schedule an event to expire Now. All events scheduled to |
| 739 |
* @tparam MEM @deduced Class method function signature type. |
287 |
* to expire "Now" are scheduled FIFO, after all normal events |
| 740 |
* @tparam OBJ @deduced Class type of the object. |
288 |
* have expired. |
| 741 |
* @tparam T1 @deduced Type of first argument. |
289 |
* |
| 742 |
* @param [in] mem_ptr Member method pointer to invoke |
290 |
* @tparam Us @deduced Formal function argument types. |
| 743 |
* @param [in] obj The object on which to invoke the member method |
291 |
* @tparam Ts @deduced Actual function argument types. |
| 744 |
* @param [in] a1 The first argument to pass to the invoked method |
292 |
* @param [in] f The function to invoke. |
|
|
293 |
* @param [in] args Arguments to pass to MakeEvent. |
| 745 |
* @return The EventId of the scheduled event. |
294 |
* @return The EventId of the scheduled event. |
| 746 |
*/ |
295 |
*/ |
| 747 |
template <typename MEM, typename OBJ, |
296 |
template <typename... Us, typename... Ts> |
| 748 |
typename T1> |
297 |
static EventId ScheduleNow (void (*f)(Us...), Ts&&... args); |
| 749 |
static EventId ScheduleNow (MEM mem_ptr, OBJ obj, T1 a1); |
|
|
| 750 |
|
| 751 |
/** |
| 752 |
* @see ScheduleNow(MEM,OBJ) |
| 753 |
* @tparam MEM @deduced Class method function signature type. |
| 754 |
* @tparam OBJ @deduced Class type of the object. |
| 755 |
* @tparam T1 @deduced Type of first argument. |
| 756 |
* @tparam T2 @deduced Type of second argument. |
| 757 |
* @param [in] mem_ptr Member method pointer to invoke |
| 758 |
* @param [in] obj The object on which to invoke the member method |
| 759 |
* @param [in] a1 The first argument to pass to the invoked method |
| 760 |
* @param [in] a2 The second argument to pass to the invoked method |
| 761 |
* @return The EventId of the scheduled event. |
| 762 |
*/ |
| 763 |
template <typename MEM, typename OBJ, |
| 764 |
typename T1, typename T2> |
| 765 |
static EventId ScheduleNow (MEM mem_ptr, OBJ obj, T1 a1, T2 a2); |
| 766 |
|
| 767 |
/** |
| 768 |
* @see ScheduleNow(MEM,OBJ) |
| 769 |
* @tparam MEM @deduced Class method function signature type. |
| 770 |
* @tparam OBJ @deduced Class type of the object. |
| 771 |
* @tparam T1 @deduced Type of first argument. |
| 772 |
* @tparam T2 @deduced Type of second argument. |
| 773 |
* @tparam T3 @deduced Type of third argument. |
| 774 |
* @param [in] mem_ptr Member method pointer to invoke |
| 775 |
* @param [in] obj The object on which to invoke the member method |
| 776 |
* @param [in] a1 The first argument to pass to the invoked method |
| 777 |
* @param [in] a2 The second argument to pass to the invoked method |
| 778 |
* @param [in] a3 The third argument to pass to the invoked method |
| 779 |
* @return The EventId of the scheduled event. |
| 780 |
*/ |
| 781 |
template <typename MEM, typename OBJ, |
| 782 |
typename T1, typename T2, typename T3> |
| 783 |
static EventId ScheduleNow (MEM mem_ptr, OBJ obj, T1 a1, T2 a2, T3 a3); |
| 784 |
|
| 785 |
/** |
| 786 |
* @see ScheduleNow(MEM,OBJ) |
| 787 |
* @tparam MEM @deduced Class method function signature type. |
| 788 |
* @tparam OBJ @deduced Class type of the object. |
| 789 |
* @tparam T1 @deduced Type of first argument. |
| 790 |
* @tparam T2 @deduced Type of second argument. |
| 791 |
* @tparam T3 @deduced Type of third argument. |
| 792 |
* @tparam T4 @deduced Type of fourth argument. |
| 793 |
* @param [in] mem_ptr Member method pointer to invoke |
| 794 |
* @param [in] obj The object on which to invoke the member method |
| 795 |
* @param [in] a1 The first argument to pass to the invoked method |
| 796 |
* @param [in] a2 The second argument to pass to the invoked method |
| 797 |
* @param [in] a3 The third argument to pass to the invoked method |
| 798 |
* @param [in] a4 The fourth argument to pass to the invoked method |
| 799 |
* @return The EventId of the scheduled event. |
| 800 |
*/ |
| 801 |
template <typename MEM, typename OBJ, |
| 802 |
typename T1, typename T2, typename T3, typename T4> |
| 803 |
static EventId ScheduleNow (MEM mem_ptr, OBJ obj, |
| 804 |
T1 a1, T2 a2, T3 a3, T4 a4); |
| 805 |
/** |
| 806 |
* @see ScheduleNow(MEM,OBJ) |
| 807 |
* @tparam MEM @deduced Class method function signature type. |
| 808 |
* @tparam OBJ @deduced Class type of the object. |
| 809 |
* @tparam T1 @deduced Type of first argument. |
| 810 |
* @tparam T2 @deduced Type of second argument. |
| 811 |
* @tparam T3 @deduced Type of third argument. |
| 812 |
* @tparam T4 @deduced Type of fourth argument. |
| 813 |
* @tparam T5 @deduced Type of fifth argument. |
| 814 |
* @param [in] mem_ptr Member method pointer to invoke |
| 815 |
* @param [in] obj The object on which to invoke the member method |
| 816 |
* @param [in] a1 The first argument to pass to the invoked method |
| 817 |
* @param [in] a2 The second argument to pass to the invoked method |
| 818 |
* @param [in] a3 The third argument to pass to the invoked method |
| 819 |
* @param [in] a4 The fourth argument to pass to the invoked method |
| 820 |
* @param [in] a5 The fifth argument to pass to the invoked method |
| 821 |
* @return The EventId of the scheduled event. |
| 822 |
*/ |
| 823 |
template <typename MEM, typename OBJ, |
| 824 |
typename T1, typename T2, typename T3, typename T4, typename T5> |
| 825 |
static EventId ScheduleNow (MEM mem_ptr, OBJ obj, |
| 826 |
T1 a1, T2 a2, T3 a3, T4 a4, T5 a5); |
| 827 |
|
| 828 |
/** |
| 829 |
* @param mem_ptr member method pointer to invoke |
| 830 |
* @param obj the object on which to invoke the member method |
| 831 |
* @param a1 the first argument to pass to the invoked method |
| 832 |
* @param a2 the second argument to pass to the invoked method |
| 833 |
* @param a3 the third argument to pass to the invoked method |
| 834 |
* @param a4 the fourth argument to pass to the invoked method |
| 835 |
* @param a5 the fifth argument to pass to the invoked method |
| 836 |
* @param a6 the sixth argument to pass to the invoked method |
| 837 |
* @return The EventId of the scheduled event. |
| 838 |
*/ |
| 839 |
template <typename MEM, typename OBJ, |
| 840 |
typename T1, typename T2, typename T3, typename T4, typename T5, typename T6> |
| 841 |
static EventId ScheduleNow (MEM mem_ptr, OBJ obj, |
| 842 |
T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6); |
| 843 |
|
| 844 |
/** |
| 845 |
* @copybrief ScheduleNow(MEM,OBJ) |
| 846 |
* |
| 847 |
* When the event expires (when it becomes due to be run), the |
| 848 |
* function will be invoked with any supplied arguments. |
| 849 |
* @param [in] f The function to invoke |
| 850 |
* @return The EventId of the scheduled event. |
| 851 |
*/ |
| 852 |
static EventId ScheduleNow (void (*f)(void)); |
| 853 |
|
| 854 |
/** |
| 855 |
* @see ScheduleNow(*) |
| 856 |
* @tparam U1 @deduced Formal type of the first argument to the function. |
| 857 |
* @tparam T1 @deduced Actual type of the first argument. |
| 858 |
* @param [in] f The function to invoke |
| 859 |
* @param [in] a1 The first argument to pass to the function to invoke |
| 860 |
* @return The EventId of the scheduled event. |
| 861 |
*/ |
| 862 |
template <typename U1, |
| 863 |
typename T1> |
| 864 |
static EventId ScheduleNow (void (*f)(U1), T1 a1); |
| 865 |
|
| 866 |
/** |
| 867 |
* @see ScheduleNow(*) |
| 868 |
* @tparam U1 @deduced Formal type of the first argument to the function. |
| 869 |
* @tparam U2 @deduced Formal type of the second argument to the function. |
| 870 |
* @tparam T1 @deduced Actual type of the first argument. |
| 871 |
* @tparam T2 @deduced Actual type of the second argument. |
| 872 |
* @param [in] f The function to invoke |
| 873 |
* @param [in] a1 The first argument to pass to the function to invoke |
| 874 |
* @param [in] a2 The second argument to pass to the function to invoke |
| 875 |
* @return The EventId of the scheduled event. |
| 876 |
*/ |
| 877 |
template <typename U1, typename U2, |
| 878 |
typename T1, typename T2> |
| 879 |
static EventId ScheduleNow (void (*f)(U1,U2), T1 a1, T2 a2); |
| 880 |
|
| 881 |
/** |
| 882 |
* @see ScheduleNow(*) |
| 883 |
* @tparam U1 @deduced Formal type of the first argument to the function. |
| 884 |
* @tparam U2 @deduced Formal type of the second argument to the function. |
| 885 |
* @tparam U3 @deduced Formal type of the third argument to the function. |
| 886 |
* @tparam T1 @deduced Actual type of the first argument. |
| 887 |
* @tparam T2 @deduced Actual type of the second argument. |
| 888 |
* @tparam T3 @deduced Actual type of the third argument. |
| 889 |
* @param [in] f The function to invoke |
| 890 |
* @param [in] a1 The first argument to pass to the function to invoke |
| 891 |
* @param [in] a2 The second argument to pass to the function to invoke |
| 892 |
* @param [in] a3 The third argument to pass to the function to invoke |
| 893 |
* @return The EventId of the scheduled event. |
| 894 |
*/ |
| 895 |
template <typename U1, typename U2, typename U3, |
| 896 |
typename T1, typename T2, typename T3> |
| 897 |
static EventId ScheduleNow (void (*f)(U1,U2,U3), T1 a1, T2 a2, T3 a3); |
| 898 |
|
| 899 |
/** |
| 900 |
* @see ScheduleNow(*) |
| 901 |
* @tparam U1 @deduced Formal type of the first argument to the function. |
| 902 |
* @tparam U2 @deduced Formal type of the second argument to the function. |
| 903 |
* @tparam U3 @deduced Formal type of the third argument to the function. |
| 904 |
* @tparam U4 @deduced Formal type of the fourth argument to the function. |
| 905 |
* @tparam T1 @deduced Actual type of the first argument. |
| 906 |
* @tparam T2 @deduced Actual type of the second argument. |
| 907 |
* @tparam T3 @deduced Actual type of the third argument. |
| 908 |
* @tparam T4 @deduced Actual type of the fourth argument. |
| 909 |
* @param [in] f The function to invoke |
| 910 |
* @param [in] a1 The first argument to pass to the function to invoke |
| 911 |
* @param [in] a2 The second argument to pass to the function to invoke |
| 912 |
* @param [in] a3 The third argument to pass to the function to invoke |
| 913 |
* @param [in] a4 The fourth argument to pass to the function to invoke |
| 914 |
* @return The EventId of the scheduled event. |
| 915 |
*/ |
| 916 |
template <typename U1, typename U2, typename U3, typename U4, |
| 917 |
typename T1, typename T2, typename T3, typename T4> |
| 918 |
static EventId ScheduleNow (void (*f)(U1,U2,U3,U4), T1 a1, T2 a2, T3 a3, T4 a4); |
| 919 |
|
| 920 |
/** |
| 921 |
* @see ScheduleNow(*) |
| 922 |
* @tparam U1 @deduced Formal type of the first argument to the function. |
| 923 |
* @tparam U2 @deduced Formal type of the second argument to the function. |
| 924 |
* @tparam U3 @deduced Formal type of the third argument to the function. |
| 925 |
* @tparam U4 @deduced Formal type of the fourth argument to the function. |
| 926 |
* @tparam U5 @deduced Formal type of the fifth argument to the function. |
| 927 |
* @tparam T1 @deduced Actual type of the first argument. |
| 928 |
* @tparam T2 @deduced Actual type of the second argument. |
| 929 |
* @tparam T3 @deduced Actual type of the third argument. |
| 930 |
* @tparam T4 @deduced Actual type of the fourth argument. |
| 931 |
* @tparam T5 @deduced Actual type of the fifth argument. |
| 932 |
* @param [in] f The function to invoke |
| 933 |
* @param [in] a1 The first argument to pass to the function to invoke |
| 934 |
* @param [in] a2 The second argument to pass to the function to invoke |
| 935 |
* @param [in] a3 The third argument to pass to the function to invoke |
| 936 |
* @param [in] a4 The fourth argument to pass to the function to invoke |
| 937 |
* @param [in] a5 The fifth argument to pass to the function to invoke |
| 938 |
* @return The EventId of the scheduled event. |
| 939 |
*/ |
| 940 |
template <typename U1, typename U2, typename U3, typename U4, typename U5, |
| 941 |
typename T1, typename T2, typename T3, typename T4, typename T5> |
| 942 |
static EventId ScheduleNow (void (*f)(U1,U2,U3,U4,U5), T1 a1, T2 a2, T3 a3, T4 a4, T5 a5); |
| 943 |
|
| 944 |
/** |
| 945 |
* @param f the function to invoke |
| 946 |
* @param a1 the first argument to pass to the function to invoke |
| 947 |
* @param a2 the second argument to pass to the function to invoke |
| 948 |
* @param a3 the third argument to pass to the function to invoke |
| 949 |
* @param a4 the fourth argument to pass to the function to invoke |
| 950 |
* @param a5 the fifth argument to pass to the function to invoke |
| 951 |
* @param a6 the sixth argument to pass to the function to invoke |
| 952 |
* @return The EventId of the scheduled event. |
| 953 |
*/ |
| 954 |
template <typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, |
| 955 |
typename T1, typename T2, typename T3, typename T4, typename T5, typename T6> |
| 956 |
static EventId ScheduleNow (void (*f)(U1,U2,U3,U4,U5,U6), T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6); |
| 957 |
|
| 958 |
/** @} */ |
298 |
/** @} */ |
| 959 |
|
299 |
|
| 960 |
/** |
300 |
/** |
|
|
| 962 |
*/ |
302 |
*/ |
| 963 |
/** @{ */ |
303 |
/** @{ */ |
| 964 |
/** |
304 |
/** |
| 965 |
* Schedule an event to expire when Simulator::Destroy is called. |
305 |
* Schedule an event to run at the end of the simulation, when Simulator::Destroy() is called. |
| 966 |
* All events scheduled to expire at "Destroy" time are scheduled FIFO, |
306 |
* All events scheduled to expire at "Destroy" time are scheduled FIFO, |
| 967 |
* after all normal events have expired and only when |
307 |
* after all normal events have expired and only when |
| 968 |
* Simulator::Destroy is invoked. |
308 |
* Simulator::Destroy is invoked. |
| 969 |
* |
309 |
* |
| 970 |
* @tparam MEM @deduced Class method function signature type. |
310 |
* @tparam Us @deduced Formal function argument types. |
| 971 |
* @tparam OBJ @deduced Class type of the object. |
311 |
* @tparam Ts @deduced Actual function argument types. |
| 972 |
* @param [in] mem_ptr Member method pointer to invoke |
312 |
* @param [in] args Arguments to pass to MakeEvent. |
| 973 |
* @param [in] obj The object on which to invoke the member method |
|
|
| 974 |
* @return The EventId of the scheduled event. |
313 |
* @return The EventId of the scheduled event. |
| 975 |
*/ |
314 |
*/ |
| 976 |
template <typename MEM, typename OBJ> |
315 |
template <typename... Ts> |
| 977 |
static EventId ScheduleDestroy (MEM mem_ptr, OBJ obj); |
316 |
static EventId ScheduleDestroy (Ts&&... args); |
| 978 |
|
317 |
|
| 979 |
/** |
318 |
/** |
| 980 |
* @see ScheduleDestroy(MEM,OBJ) |
319 |
* Schedule an event to run at the end of the simulation, when Simulator::Destroy() is called. |
| 981 |
* @tparam MEM @deduced Class method function signature type. |
320 |
* All events scheduled to expire at "Destroy" time are scheduled FIFO, |
| 982 |
* @tparam OBJ @deduced Class type of the object. |
321 |
* after all normal events have expired and only when |
| 983 |
* @tparam T1 @deduced Type of first argument. |
322 |
* Simulator::Destroy is invoked. |
| 984 |
* @param [in] mem_ptr Member method pointer to invoke |
323 |
* |
| 985 |
* @param [in] obj The object on which to invoke the member method |
324 |
* @tparam Us @deduced Formal function argument types. |
| 986 |
* @param [in] a1 The first argument to pass to the invoked method |
325 |
* @tparam Ts @deduced Actual function argument types. |
|
|
326 |
* @param [in] f The function to invoke. |
| 327 |
* @param [in] args Arguments to pass to MakeEvent. |
| 987 |
* @return The EventId of the scheduled event. |
328 |
* @return The EventId of the scheduled event. |
| 988 |
*/ |
329 |
*/ |
| 989 |
template <typename MEM, typename OBJ, |
330 |
template <typename... Us, typename... Ts> |
| 990 |
typename T1> |
331 |
static EventId ScheduleDestroy (void (*f)(Us...), Ts&&... args); |
| 991 |
static EventId ScheduleDestroy (MEM mem_ptr, OBJ obj, T1 a1); |
|
|
| 992 |
|
| 993 |
/** |
| 994 |
* @see ScheduleDestroy(MEM,OBJ) |
| 995 |
* @tparam MEM @deduced Class method function signature type. |
| 996 |
* @tparam OBJ @deduced Class type of the object. |
| 997 |
* @tparam T1 @deduced Type of first argument. |
| 998 |
* @tparam T2 @deduced Type of second argument. |
| 999 |
* @param [in] mem_ptr Member method pointer to invoke |
| 1000 |
* @param [in] obj The object on which to invoke the member method |
| 1001 |
* @param [in] a1 The first argument to pass to the invoked method |
| 1002 |
* @param [in] a2 The second argument to pass to the invoked method |
| 1003 |
* @return The EventId of the scheduled event. |
| 1004 |
*/ |
| 1005 |
template <typename MEM, typename OBJ, |
| 1006 |
typename T1, typename T2> |
| 1007 |
static EventId ScheduleDestroy (MEM mem_ptr, OBJ obj, T1 a1, T2 a2); |
| 1008 |
|
| 1009 |
/** |
| 1010 |
* @see ScheduleDestroy(MEM,OBJ) |
| 1011 |
* @tparam MEM @deduced Class method function signature type. |
| 1012 |
* @tparam OBJ @deduced Class type of the object. |
| 1013 |
* @tparam T1 @deduced Type of first argument. |
| 1014 |
* @tparam T2 @deduced Type of second argument. |
| 1015 |
* @tparam T3 @deduced Type of third argument. |
| 1016 |
* @param [in] mem_ptr Member method pointer to invoke |
| 1017 |
* @param [in] obj The object on which to invoke the member method |
| 1018 |
* @param [in] a1 The first argument to pass to the invoked method |
| 1019 |
* @param [in] a2 The second argument to pass to the invoked method |
| 1020 |
* @param [in] a3 The third argument to pass to the invoked method |
| 1021 |
* @return The EventId of the scheduled event. |
| 1022 |
*/ |
| 1023 |
template <typename MEM, typename OBJ, |
| 1024 |
typename T1, typename T2, typename T3> |
| 1025 |
static EventId ScheduleDestroy (MEM mem_ptr, OBJ obj, T1 a1, T2 a2, T3 a3); |
| 1026 |
|
| 1027 |
/** |
| 1028 |
* @see ScheduleDestroy(MEM,OBJ) |
| 1029 |
* @tparam MEM @deduced Class method function signature type. |
| 1030 |
* @tparam OBJ @deduced Class type of the object. |
| 1031 |
* @tparam T1 @deduced Type of first argument. |
| 1032 |
* @tparam T2 @deduced Type of second argument. |
| 1033 |
* @tparam T3 @deduced Type of third argument. |
| 1034 |
* @tparam T4 @deduced Type of fourth argument. |
| 1035 |
* @param [in] mem_ptr Member method pointer to invoke |
| 1036 |
* @param [in] obj The object on which to invoke the member method |
| 1037 |
* @param [in] a1 The first argument to pass to the invoked method |
| 1038 |
* @param [in] a2 The second argument to pass to the invoked method |
| 1039 |
* @param [in] a3 The third argument to pass to the invoked method |
| 1040 |
* @param [in] a4 The fourth argument to pass to the invoked method |
| 1041 |
* @return The EventId of the scheduled event. |
| 1042 |
*/ |
| 1043 |
template <typename MEM, typename OBJ, |
| 1044 |
typename T1, typename T2, typename T3, typename T4> |
| 1045 |
static EventId ScheduleDestroy (MEM mem_ptr, OBJ obj, |
| 1046 |
T1 a1, T2 a2, T3 a3, T4 a4); |
| 1047 |
/** |
| 1048 |
* @see ScheduleDestroy(MEM,OBJ) |
| 1049 |
* @tparam MEM @deduced Class method function signature type. |
| 1050 |
* @tparam OBJ @deduced Class type of the object. |
| 1051 |
* @tparam T1 @deduced Type of first argument. |
| 1052 |
* @tparam T2 @deduced Type of second argument. |
| 1053 |
* @tparam T3 @deduced Type of third argument. |
| 1054 |
* @tparam T4 @deduced Type of fourth argument. |
| 1055 |
* @tparam T5 @deduced Type of fifth argument. |
| 1056 |
* @param [in] mem_ptr Member method pointer to invoke |
| 1057 |
* @param [in] obj The object on which to invoke the member method |
| 1058 |
* @param [in] a1 The first argument to pass to the invoked method |
| 1059 |
* @param [in] a2 The second argument to pass to the invoked method |
| 1060 |
* @param [in] a3 The third argument to pass to the invoked method |
| 1061 |
* @param [in] a4 The fourth argument to pass to the invoked method |
| 1062 |
* @param [in] a5 The fifth argument to pass to the invoked method |
| 1063 |
* @return The EventId of the scheduled event. |
| 1064 |
*/ |
| 1065 |
template <typename MEM, typename OBJ, |
| 1066 |
typename T1, typename T2, typename T3, typename T4, typename T5> |
| 1067 |
static EventId ScheduleDestroy (MEM mem_ptr, OBJ obj, |
| 1068 |
T1 a1, T2 a2, T3 a3, T4 a4, T5 a5); |
| 1069 |
|
| 1070 |
/** |
| 1071 |
* @param mem_ptr member method pointer to invoke |
| 1072 |
* @param obj the object on which to invoke the member method |
| 1073 |
* @param a1 the first argument to pass to the invoked method |
| 1074 |
* @param a2 the second argument to pass to the invoked method |
| 1075 |
* @param a3 the third argument to pass to the invoked method |
| 1076 |
* @param a4 the fourth argument to pass to the invoked method |
| 1077 |
* @param a5 the fifth argument to pass to the invoked method |
| 1078 |
* @param a6 the sixth argument to pass to the invoked method |
| 1079 |
* @return The EventId of the scheduled event. |
| 1080 |
*/ |
| 1081 |
template <typename MEM, typename OBJ, |
| 1082 |
typename T1, typename T2, typename T3, typename T4, typename T5, typename T6> |
| 1083 |
static EventId ScheduleDestroy (MEM mem_ptr, OBJ obj, |
| 1084 |
T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6); |
| 1085 |
|
| 1086 |
/** |
| 1087 |
* @copybrief ScheduleDestroy(MEM,OBJ) |
| 1088 |
* When Simulator::Destroy() is called, the |
| 1089 |
* function will be invoked with any supplied arguments. |
| 1090 |
* @param [in] f The function to invoke |
| 1091 |
* @return The EventId of the scheduled event. |
| 1092 |
*/ |
| 1093 |
static EventId ScheduleDestroy (void (*f)(void)); |
| 1094 |
|
| 1095 |
/** |
| 1096 |
* @see ScheduleDestory((*)()) |
| 1097 |
* @tparam U1 @deduced Formal type of the first argument to the function. |
| 1098 |
* @tparam T1 @deduced Actual type of the first argument. |
| 1099 |
* @param [in] f The function to invoke |
| 1100 |
* @param [in] a1 The first argument to pass to the function to invoke |
| 1101 |
* @return The EventId of the scheduled event. |
| 1102 |
*/ |
| 1103 |
template <typename U1, |
| 1104 |
typename T1> |
| 1105 |
static EventId ScheduleDestroy (void (*f)(U1), T1 a1); |
| 1106 |
|
| 1107 |
/** |
| 1108 |
* @see ScheduleDestory((*)()) |
| 1109 |
* @tparam U1 @deduced Formal type of the first argument to the function. |
| 1110 |
* @tparam U2 @deduced Formal type of the second argument to the function. |
| 1111 |
* @tparam T1 @deduced Actual type of the first argument. |
| 1112 |
* @tparam T2 @deduced Actual type of the second argument. |
| 1113 |
* @param [in] f The function to invoke |
| 1114 |
* @param [in] a1 The first argument to pass to the function to invoke |
| 1115 |
* @param [in] a2 The second argument to pass to the function to invoke |
| 1116 |
* @return The EventId of the scheduled event. |
| 1117 |
*/ |
| 1118 |
template <typename U1, typename U2, |
| 1119 |
typename T1, typename T2> |
| 1120 |
static EventId ScheduleDestroy (void (*f)(U1,U2), T1 a1, T2 a2); |
| 1121 |
|
| 1122 |
/** |
| 1123 |
* @see ScheduleDestory((*)()) |
| 1124 |
* @tparam U1 @deduced Formal type of the first argument to the function. |
| 1125 |
* @tparam U2 @deduced Formal type of the second argument to the function. |
| 1126 |
* @tparam U3 @deduced Formal type of the third argument to the function. |
| 1127 |
* @tparam T1 @deduced Actual type of the first argument. |
| 1128 |
* @tparam T2 @deduced Actual type of the second argument. |
| 1129 |
* @tparam T3 @deduced Actual type of the third argument. |
| 1130 |
* @param [in] f The function to invoke |
| 1131 |
* @param [in] a1 The first argument to pass to the function to invoke |
| 1132 |
* @param [in] a2 The second argument to pass to the function to invoke |
| 1133 |
* @param [in] a3 The third argument to pass to the function to invoke |
| 1134 |
* @return The EventId of the scheduled event. |
| 1135 |
*/ |
| 1136 |
template <typename U1, typename U2, typename U3, |
| 1137 |
typename T1, typename T2, typename T3> |
| 1138 |
static EventId ScheduleDestroy (void (*f)(U1,U2,U3), T1 a1, T2 a2, T3 a3); |
| 1139 |
|
| 1140 |
/** |
| 1141 |
* @see ScheduleDestory((*)()) |
| 1142 |
* @tparam U1 @deduced Formal type of the first argument to the function. |
| 1143 |
* @tparam U2 @deduced Formal type of the second argument to the function. |
| 1144 |
* @tparam U3 @deduced Formal type of the third argument to the function. |
| 1145 |
* @tparam U4 @deduced Formal type of the fourth argument to the function. |
| 1146 |
* @tparam T1 @deduced Actual type of the first argument. |
| 1147 |
* @tparam T2 @deduced Actual type of the second argument. |
| 1148 |
* @tparam T3 @deduced Actual type of the third argument. |
| 1149 |
* @tparam T4 @deduced Actual type of the fourth argument. |
| 1150 |
* @param [in] f The function to invoke |
| 1151 |
* @param [in] a1 The first argument to pass to the function to invoke |
| 1152 |
* @param [in] a2 The second argument to pass to the function to invoke |
| 1153 |
* @param [in] a3 The third argument to pass to the function to invoke |
| 1154 |
* @param [in] a4 The fourth argument to pass to the function to invoke |
| 1155 |
* @return The EventId of the scheduled event. |
| 1156 |
*/ |
| 1157 |
template <typename U1, typename U2, typename U3, typename U4, |
| 1158 |
typename T1, typename T2, typename T3, typename T4> |
| 1159 |
static EventId ScheduleDestroy (void (*f)(U1,U2,U3,U4), T1 a1, T2 a2, T3 a3, T4 a4); |
| 1160 |
|
| 1161 |
/** |
| 1162 |
* @see ScheduleDestory((*)()) |
| 1163 |
* @tparam U1 @deduced Formal type of the first argument to the function. |
| 1164 |
* @tparam U2 @deduced Formal type of the second argument to the function. |
| 1165 |
* @tparam U3 @deduced Formal type of the third argument to the function. |
| 1166 |
* @tparam U4 @deduced Formal type of the fourth argument to the function. |
| 1167 |
* @tparam U5 @deduced Formal type of the fifth argument to the function. |
| 1168 |
* @tparam T1 @deduced Actual type of the first argument. |
| 1169 |
* @tparam T2 @deduced Actual type of the second argument. |
| 1170 |
* @tparam T3 @deduced Actual type of the third argument. |
| 1171 |
* @tparam T4 @deduced Actual type of the fourth argument. |
| 1172 |
* @tparam T5 @deduced Actual type of the fifth argument. |
| 1173 |
* @param [in] f The function to invoke |
| 1174 |
* @param [in] a1 The first argument to pass to the function to invoke |
| 1175 |
* @param [in] a2 The second argument to pass to the function to invoke |
| 1176 |
* @param [in] a3 The third argument to pass to the function to invoke |
| 1177 |
* @param [in] a4 The fourth argument to pass to the function to invoke |
| 1178 |
* @param [in] a5 The fifth argument to pass to the function to invoke |
| 1179 |
* @return The EventId of the scheduled event. |
| 1180 |
*/ |
| 1181 |
template <typename U1, typename U2, typename U3, typename U4, typename U5, |
| 1182 |
typename T1, typename T2, typename T3, typename T4, typename T5> |
| 1183 |
static EventId ScheduleDestroy (void (*f)(U1,U2,U3,U4,U5), T1 a1, T2 a2, T3 a3, T4 a4, T5 a5); |
| 1184 |
|
| 1185 |
/** |
| 1186 |
* @param f the function to invoke |
| 1187 |
* @param a1 the first argument to pass to the function to invoke |
| 1188 |
* @param a2 the second argument to pass to the function to invoke |
| 1189 |
* @param a3 the third argument to pass to the function to invoke |
| 1190 |
* @param a4 the fourth argument to pass to the function to invoke |
| 1191 |
* @param a5 the fifth argument to pass to the function to invoke |
| 1192 |
* @param a6 the sixth argument to pass to the function to invoke |
| 1193 |
* @return The EventId of the scheduled event. |
| 1194 |
*/ |
| 1195 |
template <typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, |
| 1196 |
typename T1, typename T2, typename T3, typename T4, typename T5, typename T6> |
| 1197 |
static EventId ScheduleDestroy (void (*f)(U1,U2,U3,U4,U5,U6), T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6); |
| 1198 |
|
| 1199 |
/** @} */ |
332 |
/** @} */ |
| 1200 |
|
333 |
|
| 1201 |
/** |
334 |
/** |
|
|
| 1367 |
|
500 |
|
| 1368 |
namespace ns3 { |
501 |
namespace ns3 { |
| 1369 |
|
502 |
|
| 1370 |
template <typename MEM, typename OBJ> |
503 |
template <typename... Ts> |
| 1371 |
EventId Simulator::Schedule (Time const &delay, MEM mem_ptr, OBJ obj) |
504 |
EventId Simulator::Schedule (Time const &delay, Ts&&... args) |
| 1372 |
{ |
505 |
{ |
| 1373 |
return DoSchedule (delay, MakeEvent (mem_ptr, obj)); |
506 |
return DoSchedule (delay, MakeEvent (std::forward<Ts> (args)...)); |
| 1374 |
} |
507 |
} |
| 1375 |
|
508 |
|
| 1376 |
|
509 |
template <typename... Us, typename... Ts> |
| 1377 |
template <typename MEM, typename OBJ, |
510 |
EventId Simulator::Schedule (Time const &delay, void (*f)(Us...), Ts&&... args) |
| 1378 |
typename T1> |
|
|
| 1379 |
EventId Simulator::Schedule (Time const &delay, MEM mem_ptr, OBJ obj, T1 a1) |
| 1380 |
{ |
511 |
{ |
| 1381 |
return DoSchedule (delay, MakeEvent (mem_ptr, obj, a1)); |
512 |
return DoSchedule (delay, MakeEvent (f, std::forward<Ts> (args)...)); |
| 1382 |
} |
513 |
} |
| 1383 |
|
514 |
|
| 1384 |
template <typename MEM, typename OBJ, |
515 |
template <typename... Ts> |
| 1385 |
typename T1, typename T2> |
516 |
void Simulator::ScheduleWithContext (uint32_t context, Time const &delay, Ts&&... args) |
| 1386 |
EventId Simulator::Schedule (Time const &delay, MEM mem_ptr, OBJ obj, T1 a1, T2 a2) |
|
|
| 1387 |
{ |
517 |
{ |
| 1388 |
return DoSchedule (delay, MakeEvent (mem_ptr, obj, a1, a2)); |
518 |
return ScheduleWithContext (context, delay, MakeEvent (std::forward<Ts> (args)...)); |
| 1389 |
} |
519 |
} |
| 1390 |
|
520 |
|
| 1391 |
template <typename MEM, typename OBJ, |
521 |
template <typename... Us, typename... Ts> |
| 1392 |
typename T1, typename T2, typename T3> |
522 |
void Simulator::ScheduleWithContext (uint32_t context, Time const &delay, void (*f)(Us...), Ts&&... args) |
| 1393 |
EventId Simulator::Schedule (Time const &delay, MEM mem_ptr, OBJ obj, T1 a1, T2 a2, T3 a3) |
|
|
| 1394 |
{ |
523 |
{ |
| 1395 |
return DoSchedule (delay, MakeEvent (mem_ptr, obj, a1, a2, a3)); |
524 |
return ScheduleWithContext (context, delay, MakeEvent (f, std::forward<Ts> (args)...)); |
| 1396 |
} |
525 |
} |
| 1397 |
|
526 |
|
| 1398 |
template <typename MEM, typename OBJ, |
527 |
template <typename... Ts> |
| 1399 |
typename T1, typename T2, typename T3, typename T4> |
528 |
EventId |
| 1400 |
EventId Simulator::Schedule (Time const &delay, MEM mem_ptr, OBJ obj, T1 a1, T2 a2, T3 a3, T4 a4) |
529 |
Simulator::ScheduleNow (Ts&&... args) |
| 1401 |
{ |
530 |
{ |
| 1402 |
return DoSchedule (delay, MakeEvent (mem_ptr, obj, a1, a2, a3, a4)); |
531 |
return DoScheduleNow (MakeEvent (std::forward<Ts> (args)...)); |
| 1403 |
} |
532 |
} |
| 1404 |
|
533 |
|
| 1405 |
template <typename MEM, typename OBJ, |
534 |
template <typename... Us, typename... Ts> |
| 1406 |
typename T1, typename T2, typename T3, typename T4, typename T5> |
535 |
EventId |
| 1407 |
EventId Simulator::Schedule (Time const &delay, MEM mem_ptr, OBJ obj, |
536 |
Simulator::ScheduleNow (void (*f)(Us...), Ts&&... args) |
| 1408 |
T1 a1, T2 a2, T3 a3, T4 a4, T5 a5) |
|
|
| 1409 |
{ |
537 |
{ |
| 1410 |
return DoSchedule (delay, MakeEvent (mem_ptr, obj, a1, a2, a3, a4, a5)); |
538 |
return DoScheduleNow (MakeEvent (f, std::forward<Ts> (args)...)); |
| 1411 |
} |
539 |
} |
| 1412 |
|
540 |
|
| 1413 |
template <typename MEM, typename OBJ, |
541 |
template <typename... Ts> |
| 1414 |
typename T1, typename T2, typename T3, typename T4, typename T5, typename T6> |
542 |
EventId |
| 1415 |
EventId Simulator::Schedule (Time const &time, MEM mem_ptr, OBJ obj, |
543 |
Simulator::ScheduleDestroy (Ts&&... args) |
| 1416 |
T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6) |
|
|
| 1417 |
{ |
544 |
{ |
| 1418 |
return DoSchedule (time, MakeEvent (mem_ptr, obj, a1, a2, a3, a4, a5, a6)); |
545 |
return DoScheduleDestroy (MakeEvent (std::forward<Ts> (args)...)); |
| 1419 |
} |
546 |
} |
| 1420 |
|
547 |
|
| 1421 |
template <typename U1, |
548 |
template <typename... Us, typename... Ts> |
| 1422 |
typename T1> |
549 |
EventId |
| 1423 |
EventId Simulator::Schedule (Time const &delay, void (*f)(U1), T1 a1) |
550 |
Simulator::ScheduleDestroy (void (*f)(Us...), Ts&&... args) |
| 1424 |
{ |
551 |
{ |
| 1425 |
return DoSchedule (delay, MakeEvent (f, a1)); |
552 |
return DoScheduleDestroy (MakeEvent (f, std::forward<Ts> (args)...)); |
| 1426 |
} |
|
|
| 1427 |
|
| 1428 |
template <typename U1, typename U2, |
| 1429 |
typename T1, typename T2> |
| 1430 |
EventId Simulator::Schedule (Time const &delay, void (*f)(U1,U2), T1 a1, T2 a2) |
| 1431 |
{ |
| 1432 |
return DoSchedule (delay, MakeEvent (f, a1, a2)); |
| 1433 |
} |
| 1434 |
|
| 1435 |
template <typename U1, typename U2, typename U3, |
| 1436 |
typename T1, typename T2, typename T3> |
| 1437 |
EventId Simulator::Schedule (Time const &delay, void (*f)(U1,U2,U3), T1 a1, T2 a2, T3 a3) |
| 1438 |
{ |
| 1439 |
return DoSchedule (delay, MakeEvent (f, a1, a2, a3)); |
| 1440 |
} |
| 1441 |
|
| 1442 |
template <typename U1, typename U2, typename U3, typename U4, |
| 1443 |
typename T1, typename T2, typename T3, typename T4> |
| 1444 |
EventId Simulator::Schedule (Time const &delay, void (*f)(U1,U2,U3,U4), T1 a1, T2 a2, T3 a3, T4 a4) |
| 1445 |
{ |
| 1446 |
return DoSchedule (delay, MakeEvent (f, a1, a2, a3, a4)); |
| 1447 |
} |
| 1448 |
|
| 1449 |
template <typename U1, typename U2, typename U3, typename U4, typename U5, |
| 1450 |
typename T1, typename T2, typename T3, typename T4, typename T5> |
| 1451 |
EventId Simulator::Schedule (Time const &delay, void (*f)(U1,U2,U3,U4,U5), T1 a1, T2 a2, T3 a3, T4 a4, T5 a5) |
| 1452 |
{ |
| 1453 |
return DoSchedule (delay, MakeEvent (f, a1, a2, a3, a4, a5)); |
| 1454 |
} |
| 1455 |
|
| 1456 |
template <typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, |
| 1457 |
typename T1, typename T2, typename T3, typename T4, typename T5, typename T6> |
| 1458 |
EventId Simulator::Schedule (Time const &time, void (*f)(U1,U2,U3,U4,U5,U6), T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6) |
| 1459 |
{ |
| 1460 |
return DoSchedule (time, MakeEvent (f, a1, a2, a3, a4, a5, a6)); |
| 1461 |
} |
| 1462 |
|
| 1463 |
|
| 1464 |
template <typename MEM, typename OBJ> |
| 1465 |
void Simulator::ScheduleWithContext (uint32_t context, Time const &delay, MEM mem_ptr, OBJ obj) |
| 1466 |
{ |
| 1467 |
ScheduleWithContext (context, delay, MakeEvent (mem_ptr, obj)); |
| 1468 |
} |
| 1469 |
|
| 1470 |
|
| 1471 |
template <typename MEM, typename OBJ, |
| 1472 |
typename T1> |
| 1473 |
void Simulator::ScheduleWithContext (uint32_t context, Time const &delay, MEM mem_ptr, OBJ obj, T1 a1) |
| 1474 |
{ |
| 1475 |
return ScheduleWithContext (context, delay, MakeEvent (mem_ptr, obj, a1)); |
| 1476 |
} |
| 1477 |
|
| 1478 |
template <typename MEM, typename OBJ, |
| 1479 |
typename T1, typename T2> |
| 1480 |
void Simulator::ScheduleWithContext (uint32_t context, Time const &delay, MEM mem_ptr, OBJ obj, T1 a1, T2 a2) |
| 1481 |
{ |
| 1482 |
return ScheduleWithContext (context, delay, MakeEvent (mem_ptr, obj, a1, a2)); |
| 1483 |
} |
| 1484 |
|
| 1485 |
template <typename MEM, typename OBJ, |
| 1486 |
typename T1, typename T2, typename T3> |
| 1487 |
void Simulator::ScheduleWithContext (uint32_t context, Time const &delay, MEM mem_ptr, OBJ obj, T1 a1, T2 a2, T3 a3) |
| 1488 |
{ |
| 1489 |
return ScheduleWithContext (context, delay, MakeEvent (mem_ptr, obj, a1, a2, a3)); |
| 1490 |
} |
| 1491 |
|
| 1492 |
template <typename MEM, typename OBJ, |
| 1493 |
typename T1, typename T2, typename T3, typename T4> |
| 1494 |
void Simulator::ScheduleWithContext (uint32_t context, Time const &delay, MEM mem_ptr, OBJ obj, T1 a1, T2 a2, T3 a3, T4 a4) |
| 1495 |
{ |
| 1496 |
return ScheduleWithContext (context, delay, MakeEvent (mem_ptr, obj, a1, a2, a3, a4)); |
| 1497 |
} |
| 1498 |
|
| 1499 |
template <typename MEM, typename OBJ, |
| 1500 |
typename T1, typename T2, typename T3, typename T4, typename T5> |
| 1501 |
void Simulator::ScheduleWithContext (uint32_t context, Time const &delay, MEM mem_ptr, OBJ obj, |
| 1502 |
T1 a1, T2 a2, T3 a3, T4 a4, T5 a5) |
| 1503 |
{ |
| 1504 |
return ScheduleWithContext (context, delay, MakeEvent (mem_ptr, obj, a1, a2, a3, a4, a5)); |
| 1505 |
} |
| 1506 |
|
| 1507 |
template <typename MEM, typename OBJ, |
| 1508 |
typename T1, typename T2, typename T3, typename T4, typename T5, typename T6> |
| 1509 |
void Simulator::ScheduleWithContext (uint32_t context, Time const &time, MEM mem_ptr, OBJ obj, |
| 1510 |
T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6) |
| 1511 |
{ |
| 1512 |
return ScheduleWithContext (context, time, MakeEvent (mem_ptr, obj, a1, a2, a3, a4, a5, a6)); |
| 1513 |
} |
| 1514 |
|
| 1515 |
template <typename U1, |
| 1516 |
typename T1> |
| 1517 |
void Simulator::ScheduleWithContext (uint32_t context, Time const &delay, void (*f)(U1), T1 a1) |
| 1518 |
{ |
| 1519 |
return ScheduleWithContext (context, delay, MakeEvent (f, a1)); |
| 1520 |
} |
| 1521 |
|
| 1522 |
template <typename U1, typename U2, |
| 1523 |
typename T1, typename T2> |
| 1524 |
void Simulator::ScheduleWithContext (uint32_t context, Time const &delay, void (*f)(U1,U2), T1 a1, T2 a2) |
| 1525 |
{ |
| 1526 |
return ScheduleWithContext (context, delay, MakeEvent (f, a1, a2)); |
| 1527 |
} |
| 1528 |
|
| 1529 |
template <typename U1, typename U2, typename U3, |
| 1530 |
typename T1, typename T2, typename T3> |
| 1531 |
void Simulator::ScheduleWithContext (uint32_t context, Time const &delay, void (*f)(U1,U2,U3), T1 a1, T2 a2, T3 a3) |
| 1532 |
{ |
| 1533 |
return ScheduleWithContext (context, delay, MakeEvent (f, a1, a2, a3)); |
| 1534 |
} |
| 1535 |
|
| 1536 |
template <typename U1, typename U2, typename U3, typename U4, |
| 1537 |
typename T1, typename T2, typename T3, typename T4> |
| 1538 |
void Simulator::ScheduleWithContext (uint32_t context, Time const &delay, void (*f)(U1,U2,U3,U4), T1 a1, T2 a2, T3 a3, T4 a4) |
| 1539 |
{ |
| 1540 |
return ScheduleWithContext (context, delay, MakeEvent (f, a1, a2, a3, a4)); |
| 1541 |
} |
| 1542 |
|
| 1543 |
template <typename U1, typename U2, typename U3, typename U4, typename U5, |
| 1544 |
typename T1, typename T2, typename T3, typename T4, typename T5> |
| 1545 |
void Simulator::ScheduleWithContext (uint32_t context, Time const &delay, void (*f)(U1,U2,U3,U4,U5), T1 a1, T2 a2, T3 a3, T4 a4, T5 a5) |
| 1546 |
{ |
| 1547 |
return ScheduleWithContext (context, delay, MakeEvent (f, a1, a2, a3, a4, a5)); |
| 1548 |
} |
| 1549 |
|
| 1550 |
template <typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, |
| 1551 |
typename T1, typename T2, typename T3, typename T4, typename T5, typename T6> |
| 1552 |
void Simulator::ScheduleWithContext (uint32_t context, Time const &time, void (*f)(U1,U2,U3,U4,U5,U6), T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6) |
| 1553 |
{ |
| 1554 |
return ScheduleWithContext (context, time, MakeEvent (f, a1, a2, a3, a4, a5, a6)); |
| 1555 |
} |
| 1556 |
|
| 1557 |
|
| 1558 |
template <typename MEM, typename OBJ> |
| 1559 |
EventId |
| 1560 |
Simulator::ScheduleNow (MEM mem_ptr, OBJ obj) |
| 1561 |
{ |
| 1562 |
return DoScheduleNow (MakeEvent (mem_ptr, obj)); |
| 1563 |
} |
| 1564 |
|
| 1565 |
|
| 1566 |
template <typename MEM, typename OBJ, |
| 1567 |
typename T1> |
| 1568 |
EventId |
| 1569 |
Simulator::ScheduleNow (MEM mem_ptr, OBJ obj, T1 a1) |
| 1570 |
{ |
| 1571 |
return DoScheduleNow (MakeEvent (mem_ptr, obj, a1)); |
| 1572 |
} |
| 1573 |
|
| 1574 |
template <typename MEM, typename OBJ, |
| 1575 |
typename T1, typename T2> |
| 1576 |
EventId |
| 1577 |
Simulator::ScheduleNow (MEM mem_ptr, OBJ obj, T1 a1, T2 a2) |
| 1578 |
{ |
| 1579 |
return DoScheduleNow (MakeEvent (mem_ptr, obj, a1, a2)); |
| 1580 |
} |
| 1581 |
|
| 1582 |
template <typename MEM, typename OBJ, |
| 1583 |
typename T1, typename T2, typename T3> |
| 1584 |
EventId |
| 1585 |
Simulator::ScheduleNow (MEM mem_ptr, OBJ obj, T1 a1, T2 a2, T3 a3) |
| 1586 |
{ |
| 1587 |
return DoScheduleNow (MakeEvent (mem_ptr, obj, a1, a2, a3)); |
| 1588 |
} |
| 1589 |
|
| 1590 |
template <typename MEM, typename OBJ, |
| 1591 |
typename T1, typename T2, typename T3, typename T4> |
| 1592 |
EventId |
| 1593 |
Simulator::ScheduleNow (MEM mem_ptr, OBJ obj, T1 a1, T2 a2, T3 a3, T4 a4) |
| 1594 |
{ |
| 1595 |
return DoScheduleNow (MakeEvent (mem_ptr, obj, a1, a2, a3, a4)); |
| 1596 |
} |
| 1597 |
|
| 1598 |
template <typename MEM, typename OBJ, |
| 1599 |
typename T1, typename T2, typename T3, typename T4, typename T5> |
| 1600 |
EventId |
| 1601 |
Simulator::ScheduleNow (MEM mem_ptr, OBJ obj, |
| 1602 |
T1 a1, T2 a2, T3 a3, T4 a4, T5 a5) |
| 1603 |
{ |
| 1604 |
return DoScheduleNow (MakeEvent (mem_ptr, obj, a1, a2, a3, a4, a5)); |
| 1605 |
} |
| 1606 |
|
| 1607 |
template <typename MEM, typename OBJ, |
| 1608 |
typename T1, typename T2, typename T3, typename T4, typename T5, typename T6> |
| 1609 |
EventId |
| 1610 |
Simulator::ScheduleNow (MEM mem_ptr, OBJ obj, |
| 1611 |
T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6) |
| 1612 |
{ |
| 1613 |
return DoScheduleNow (MakeEvent (mem_ptr, obj, a1, a2, a3, a4, a5, a6)); |
| 1614 |
} |
| 1615 |
|
| 1616 |
template <typename U1, |
| 1617 |
typename T1> |
| 1618 |
EventId |
| 1619 |
Simulator::ScheduleNow (void (*f)(U1), T1 a1) |
| 1620 |
{ |
| 1621 |
return DoScheduleNow (MakeEvent (f, a1)); |
| 1622 |
} |
| 1623 |
|
| 1624 |
template <typename U1, typename U2, |
| 1625 |
typename T1, typename T2> |
| 1626 |
EventId |
| 1627 |
Simulator::ScheduleNow (void (*f)(U1,U2), T1 a1, T2 a2) |
| 1628 |
{ |
| 1629 |
return DoScheduleNow (MakeEvent (f, a1, a2)); |
| 1630 |
} |
| 1631 |
|
| 1632 |
template <typename U1, typename U2, typename U3, |
| 1633 |
typename T1, typename T2, typename T3> |
| 1634 |
EventId |
| 1635 |
Simulator::ScheduleNow (void (*f)(U1,U2,U3), T1 a1, T2 a2, T3 a3) |
| 1636 |
{ |
| 1637 |
return DoScheduleNow (MakeEvent (f, a1, a2, a3)); |
| 1638 |
} |
| 1639 |
|
| 1640 |
template <typename U1, typename U2, typename U3, typename U4, |
| 1641 |
typename T1, typename T2, typename T3, typename T4> |
| 1642 |
EventId |
| 1643 |
Simulator::ScheduleNow (void (*f)(U1,U2,U3,U4), T1 a1, T2 a2, T3 a3, T4 a4) |
| 1644 |
{ |
| 1645 |
return DoScheduleNow (MakeEvent (f, a1, a2, a3, a4)); |
| 1646 |
} |
| 1647 |
|
| 1648 |
template <typename U1, typename U2, typename U3, typename U4, typename U5, |
| 1649 |
typename T1, typename T2, typename T3, typename T4, typename T5> |
| 1650 |
EventId |
| 1651 |
Simulator::ScheduleNow (void (*f)(U1,U2,U3,U4,U5), T1 a1, T2 a2, T3 a3, T4 a4, T5 a5) |
| 1652 |
{ |
| 1653 |
return DoScheduleNow (MakeEvent (f, a1, a2, a3, a4, a5)); |
| 1654 |
} |
| 1655 |
|
| 1656 |
template <typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, |
| 1657 |
typename T1, typename T2, typename T3, typename T4, typename T5, typename T6> |
| 1658 |
EventId |
| 1659 |
Simulator::ScheduleNow (void (*f)(U1,U2,U3,U4,U5,U6), T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6) |
| 1660 |
{ |
| 1661 |
return DoScheduleNow (MakeEvent (f, a1, a2, a3, a4, a5, a6)); |
| 1662 |
} |
| 1663 |
|
| 1664 |
|
| 1665 |
template <typename MEM, typename OBJ> |
| 1666 |
EventId |
| 1667 |
Simulator::ScheduleDestroy (MEM mem_ptr, OBJ obj) |
| 1668 |
{ |
| 1669 |
return DoScheduleDestroy (MakeEvent (mem_ptr, obj)); |
| 1670 |
} |
| 1671 |
|
| 1672 |
|
| 1673 |
template <typename MEM, typename OBJ, |
| 1674 |
typename T1> |
| 1675 |
EventId |
| 1676 |
Simulator::ScheduleDestroy (MEM mem_ptr, OBJ obj, T1 a1) |
| 1677 |
{ |
| 1678 |
return DoScheduleDestroy (MakeEvent (mem_ptr, obj, a1)); |
| 1679 |
} |
| 1680 |
|
| 1681 |
template <typename MEM, typename OBJ, |
| 1682 |
typename T1, typename T2> |
| 1683 |
EventId |
| 1684 |
Simulator::ScheduleDestroy (MEM mem_ptr, OBJ obj, T1 a1, T2 a2) |
| 1685 |
{ |
| 1686 |
return DoScheduleDestroy (MakeEvent (mem_ptr, obj, a1, a2)); |
| 1687 |
} |
| 1688 |
|
| 1689 |
template <typename MEM, typename OBJ, |
| 1690 |
typename T1, typename T2, typename T3> |
| 1691 |
EventId |
| 1692 |
Simulator::ScheduleDestroy (MEM mem_ptr, OBJ obj, T1 a1, T2 a2, T3 a3) |
| 1693 |
{ |
| 1694 |
return DoScheduleDestroy (MakeEvent (mem_ptr, obj, a1, a2, a3)); |
| 1695 |
} |
| 1696 |
|
| 1697 |
template <typename MEM, typename OBJ, |
| 1698 |
typename T1, typename T2, typename T3, typename T4> |
| 1699 |
EventId |
| 1700 |
Simulator::ScheduleDestroy (MEM mem_ptr, OBJ obj, T1 a1, T2 a2, T3 a3, T4 a4) |
| 1701 |
{ |
| 1702 |
return DoScheduleDestroy (MakeEvent (mem_ptr, obj, a1, a2, a3, a4)); |
| 1703 |
} |
| 1704 |
|
| 1705 |
template <typename MEM, typename OBJ, |
| 1706 |
typename T1, typename T2, typename T3, typename T4, typename T5> |
| 1707 |
EventId |
| 1708 |
Simulator::ScheduleDestroy (MEM mem_ptr, OBJ obj, |
| 1709 |
T1 a1, T2 a2, T3 a3, T4 a4, T5 a5) |
| 1710 |
{ |
| 1711 |
return DoScheduleDestroy (MakeEvent (mem_ptr, obj, a1, a2, a3, a4, a5)); |
| 1712 |
} |
| 1713 |
|
| 1714 |
template <typename MEM, typename OBJ, |
| 1715 |
typename T1, typename T2, typename T3, typename T4, typename T5, typename T6> |
| 1716 |
EventId |
| 1717 |
Simulator::ScheduleDestroy (MEM mem_ptr, OBJ obj, |
| 1718 |
T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6) |
| 1719 |
{ |
| 1720 |
return DoScheduleDestroy (MakeEvent (mem_ptr, obj, a1, a2, a3, a4, a5, a6)); |
| 1721 |
} |
| 1722 |
|
| 1723 |
template <typename U1, |
| 1724 |
typename T1> |
| 1725 |
EventId |
| 1726 |
Simulator::ScheduleDestroy (void (*f)(U1), T1 a1) |
| 1727 |
{ |
| 1728 |
return DoScheduleDestroy (MakeEvent (f, a1)); |
| 1729 |
} |
| 1730 |
|
| 1731 |
template <typename U1, typename U2, |
| 1732 |
typename T1, typename T2> |
| 1733 |
EventId |
| 1734 |
Simulator::ScheduleDestroy (void (*f)(U1,U2), T1 a1, T2 a2) |
| 1735 |
{ |
| 1736 |
return DoScheduleDestroy (MakeEvent (f, a1, a2)); |
| 1737 |
} |
| 1738 |
|
| 1739 |
template <typename U1, typename U2, typename U3, |
| 1740 |
typename T1, typename T2, typename T3> |
| 1741 |
EventId |
| 1742 |
Simulator::ScheduleDestroy (void (*f)(U1,U2,U3), T1 a1, T2 a2, T3 a3) |
| 1743 |
{ |
| 1744 |
return DoScheduleDestroy (MakeEvent (f, a1, a2, a3)); |
| 1745 |
} |
| 1746 |
|
| 1747 |
template <typename U1, typename U2, typename U3, typename U4, |
| 1748 |
typename T1, typename T2, typename T3, typename T4> |
| 1749 |
EventId |
| 1750 |
Simulator::ScheduleDestroy (void (*f)(U1,U2,U3,U4), T1 a1, T2 a2, T3 a3, T4 a4) |
| 1751 |
{ |
| 1752 |
return DoScheduleDestroy (MakeEvent (f, a1, a2, a3, a4)); |
| 1753 |
} |
| 1754 |
|
| 1755 |
template <typename U1, typename U2, typename U3, typename U4, typename U5, |
| 1756 |
typename T1, typename T2, typename T3, typename T4, typename T5> |
| 1757 |
EventId |
| 1758 |
Simulator::ScheduleDestroy (void (*f)(U1,U2,U3,U4,U5), T1 a1, T2 a2, T3 a3, T4 a4, T5 a5) |
| 1759 |
{ |
| 1760 |
return DoScheduleDestroy (MakeEvent (f, a1, a2, a3, a4, a5)); |
| 1761 |
} |
| 1762 |
|
| 1763 |
template <typename U1, typename U2, typename U3, typename U4, typename U5, typename U6, |
| 1764 |
typename T1, typename T2, typename T3, typename T4, typename T5, typename T6> |
| 1765 |
EventId |
| 1766 |
Simulator::ScheduleDestroy (void (*f)(U1,U2,U3,U4,U5,U6), T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6) |
| 1767 |
{ |
| 1768 |
return DoScheduleDestroy (MakeEvent (f, a1, a2, a3, a4, a5, a6)); |
| 1769 |
} |
553 |
} |
| 1770 |
|
554 |
|
| 1771 |
} // namespace ns3 |
555 |
} // namespace ns3 |