diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2014-01-23 16:03:53 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2014-01-23 16:03:53 +0000 |
commit | 7401d20fe0d587ca704228d4b1474666cad3df12 (patch) | |
tree | 02a53cb537d0f7e72dcc6d616f27a72e351d42b0 /src/ats-tests/ats-testing.h | |
parent | d10f54d435d545b4fdafd4ffa278f786b5f500dc (diff) | |
download | gnunet-7401d20fe0d587ca704228d4b1474666cad3df12.tar.gz gnunet-7401d20fe0d587ca704228d4b1474666cad3df12.zip |
implementing operations, episodes...
Diffstat (limited to 'src/ats-tests/ats-testing.h')
-rw-r--r-- | src/ats-tests/ats-testing.h | 41 |
1 files changed, 31 insertions, 10 deletions
diff --git a/src/ats-tests/ats-testing.h b/src/ats-tests/ats-testing.h index 028789d69..a2937d51d 100644 --- a/src/ats-tests/ats-testing.h +++ b/src/ats-tests/ats-testing.h | |||
@@ -385,15 +385,43 @@ struct GNUNET_ATS_TEST_Topology | |||
385 | void *done_cb_cls; | 385 | void *done_cb_cls; |
386 | }; | 386 | }; |
387 | 387 | ||
388 | struct Experiment; | 388 | enum OperationType |
389 | { | ||
390 | START_SEND, | ||
391 | STOP_SEND, | ||
392 | SET_RATE, | ||
393 | SET_PREFERENCE | ||
394 | }; | ||
389 | 395 | ||
390 | struct Episode; | 396 | struct Episode; |
391 | 397 | ||
398 | struct Experiment; | ||
399 | |||
392 | typedef void (*GNUNET_ATS_TESTING_EpisodeDoneCallback) ( | 400 | typedef void (*GNUNET_ATS_TESTING_EpisodeDoneCallback) ( |
393 | struct Episode *e); | 401 | struct Episode *e); |
394 | 402 | ||
395 | typedef void (*GNUNET_ATS_TESTING_ExperimentDoneCallback) ( | 403 | typedef void (*GNUNET_ATS_TESTING_ExperimentDoneCallback) (struct Experiment *e, |
396 | struct Experiment *e, int success); | 404 | struct GNUNET_TIME_Relative duration,int success); |
405 | |||
406 | struct Operation | ||
407 | { | ||
408 | struct Operation *next; | ||
409 | struct Operation *prev; | ||
410 | long long unsigned int src_id; | ||
411 | long long unsigned int dest_id; | ||
412 | long long unsigned int value; | ||
413 | enum OperationType type; | ||
414 | }; | ||
415 | |||
416 | struct Episode | ||
417 | { | ||
418 | int id; | ||
419 | struct Episode *next; | ||
420 | struct GNUNET_TIME_Relative duration; | ||
421 | |||
422 | struct Operation *head; | ||
423 | struct Operation *tail; | ||
424 | }; | ||
397 | 425 | ||
398 | 426 | ||
399 | struct Experiment | 427 | struct Experiment |
@@ -416,13 +444,6 @@ struct Experiment | |||
416 | GNUNET_ATS_TESTING_ExperimentDoneCallback e_done_cb; | 444 | GNUNET_ATS_TESTING_ExperimentDoneCallback e_done_cb; |
417 | }; | 445 | }; |
418 | 446 | ||
419 | struct Episode | ||
420 | { | ||
421 | int id; | ||
422 | struct Episode *next; | ||
423 | struct GNUNET_TIME_Relative duration; | ||
424 | }; | ||
425 | |||
426 | void | 447 | void |
427 | GNUNET_ATS_TEST_experimentation_run (struct Experiment *e, | 448 | GNUNET_ATS_TEST_experimentation_run (struct Experiment *e, |
428 | GNUNET_ATS_TESTING_EpisodeDoneCallback ep_done_cb, | 449 | GNUNET_ATS_TESTING_EpisodeDoneCallback ep_done_cb, |