From c67e0fff3369c798e54e5241e89a2abdee5fb832 Mon Sep 17 00:00:00 2001 From: Vincenzo Maffione Date: Sun, 23 Oct 2016 19:21:29 +0200 Subject: libarcfire: add Experiment subclasses --- libarcfire.py | 30 ++++++++++++++++++++++++++++++ main.py | 2 +- 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/libarcfire.py b/libarcfire.py index 60bce47..0993d66 100755 --- a/libarcfire.py +++ b/libarcfire.py @@ -105,3 +105,33 @@ class Experiment: print("[experiment %s] start" % self.name) print("[experiment %s] end" % self.name) + +# An experiment over the IRATI implementation +class IRATIExperiment(Experiment): + def __init__(self, name): + Experiment.__init__(self, name) + + def run(self): + print("[IRATI experiment %s] start" % self.name) + print("[IRATI experiment %s] end" % self.name) + + +# An experiment over the RLITE implementation +class RLITEExperiment(Experiment): + def __init__(self, name): + Experiment.__init__(self, name) + + def run(self): + print("[RLITE experiment %s] start" % self.name) + print("[RLITE experiment %s] end" % self.name) + + +# An experiment over the OUROBOROS implementation +class OUROBOROSExperiment(Experiment): + def __init__(self, name): + Experiment.__init__(self, name) + + def run(self): + print("[OUROBOROS experiment %s] start" % self.name) + print("[OUROBOROS experiment %s] end" % self.name) + diff --git a/main.py b/main.py index 7777a93..23f044a 100755 --- a/main.py +++ b/main.py @@ -5,7 +5,7 @@ from libarcfire import * -exp = Experiment("prova") +exp = IRATIExperiment("prova") exp.dif_add(ShimEthDIF("300", 0, ["a", "b"])) exp.dif_add(ShimEthDIF("400", 0, ["b", "c"])) -- cgit v1.2.3