aboutsummaryrefslogtreecommitdiff
path: root/src/ats-tests/ats-testing.h
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2014-01-23 16:03:53 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2014-01-23 16:03:53 +0000
commit7401d20fe0d587ca704228d4b1474666cad3df12 (patch)
tree02a53cb537d0f7e72dcc6d616f27a72e351d42b0 /src/ats-tests/ats-testing.h
parentd10f54d435d545b4fdafd4ffa278f786b5f500dc (diff)
downloadgnunet-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.h41
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
388struct Experiment; 388enum OperationType
389{
390 START_SEND,
391 STOP_SEND,
392 SET_RATE,
393 SET_PREFERENCE
394};
389 395
390struct Episode; 396struct Episode;
391 397
398struct Experiment;
399
392typedef void (*GNUNET_ATS_TESTING_EpisodeDoneCallback) ( 400typedef void (*GNUNET_ATS_TESTING_EpisodeDoneCallback) (
393 struct Episode *e); 401 struct Episode *e);
394 402
395typedef void (*GNUNET_ATS_TESTING_ExperimentDoneCallback) ( 403typedef void (*GNUNET_ATS_TESTING_ExperimentDoneCallback) (struct Experiment *e,
396 struct Experiment *e, int success); 404 struct GNUNET_TIME_Relative duration,int success);
405
406struct 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
416struct 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
399struct Experiment 427struct 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
419struct Episode
420{
421 int id;
422 struct Episode *next;
423 struct GNUNET_TIME_Relative duration;
424};
425
426void 447void
427GNUNET_ATS_TEST_experimentation_run (struct Experiment *e, 448GNUNET_ATS_TEST_experimentation_run (struct Experiment *e,
428 GNUNET_ATS_TESTING_EpisodeDoneCallback ep_done_cb, 449 GNUNET_ATS_TESTING_EpisodeDoneCallback ep_done_cb,