summaryrefslogtreecommitdiff
path: root/cesar/maximus/scheduler/utest/inc/EventExpected.h
diff options
context:
space:
mode:
authorThierry Carré2012-10-16 12:45:48 +0200
committerThierry Carré2013-01-31 15:04:48 +0100
commit4452a8abe0d135b1f690b530a3bb4b1e495d7b65 (patch)
treeffa06423693d00cdaccd3d8a51d3c6c61ec2b2f3 /cesar/maximus/scheduler/utest/inc/EventExpected.h
parent83441de4ab01355295cfe6a6e389ad5bc66fd361 (diff)
cesar/maximus: C++ maximus refactoring, closes #3336, closes #3098
Feedback on new performance on tests inside: test_general/station Ratio = Test duration before this commit divided by new duration. |--------------------------------------------|-------| | Unit test | Ratio | |--------------------------------------------|-------| | maximus/py/sc01_long_simu.py | 6.5 | | maximus/py/sc02_long_simu.py | 4.5 | | scenario/av/py/sc01_assoc_auth.py | 3.3 | | scenario/av/py/sc02_stas_communication.py | 4.5 | | scenario/av/py/sc03_two_avln_coexisting.py | 2.1 | | scenario/av/py/sc04_cc_whoru.py | 2.1 | | scenario/av/py/sc05_cc_leave.py | 2.3 | | scenario/av/py/sc06_discover_procedure.py | 2.3 | | scenario/av/py/sc07_bridge.py | 2.2 | | scenario/av/py/sc08_bentry_change.py | 2.1 | | scenario/av/py/sc09_simple_connect.py | 2.2 | | scenario/av/py/sc10_short_messages.py | 5.7 | | scenario/av/py/sc11_cm_nw_info.py | 4.7 | | scenario/av/py/sc12_change_nmk.py | 5.5 | | scenario/av/py/sc14_igmp.py | 4.0 | | scenario/av/py/sc15_hide.py | 6.0 | | compliance/py/sc01_dut_as_a_cco.py | 5.8 | | tonemap/py/sc01_bl_initial.py | 2.3 | | tonemap/py/sc02_vs_get_tonemap.py | 2.3 | |--------------------------------------------|-------| | Average speed improvement of Maximus is | 4.9 | |--------------------------------------------|-------| Many tickets have been opened to continue the refactoring. Titles begin by "[Maximus][Refactoring]" in pessac's trac. For this reason #3336 is close. #3098 is really fixed.
Diffstat (limited to 'cesar/maximus/scheduler/utest/inc/EventExpected.h')
-rw-r--r--cesar/maximus/scheduler/utest/inc/EventExpected.h79
1 files changed, 79 insertions, 0 deletions
diff --git a/cesar/maximus/scheduler/utest/inc/EventExpected.h b/cesar/maximus/scheduler/utest/inc/EventExpected.h
new file mode 100644
index 0000000000..cc91aa0657
--- /dev/null
+++ b/cesar/maximus/scheduler/utest/inc/EventExpected.h
@@ -0,0 +1,79 @@
+#ifndef maximus_scheduler_utest_inc_eventexpected_h
+#define maximus_scheduler_utest_inc_eventexpected_h
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/scheduler/utest/inc/EventExpected.h
+ * \ingroup maximus_scheduler_utest
+ *
+ */
+#include "maximus/common/types/networkclock_types.h"
+#include "maximus/common/types/sci_types.h"
+#include "maximus/sci/sci_msg.h"
+#include <list>
+
+class EventExpected
+{
+private:
+ Network_Clock_Tick tick;
+ Sci_Msg_Station_Id sta_id;
+ Network_Clock_Id clock_id;
+ Network_Clock_Type evt_type;
+ SciMsg *msg;
+
+public:
+ EventExpected (
+ Network_Clock_Tick a,
+ Sci_Msg_Station_Id b,
+ Network_Clock_Id c,
+ Network_Clock_Type d,
+ SciMsg *e);
+
+ ~EventExpected ();
+
+ inline bool operator == (EventExpected &comp) const
+ {
+ if (tick == comp.get_tick ()
+ && sta_id == comp.get_sta_id ()
+ && clock_id == comp.get_clock_id ()
+ && evt_type == comp.get_evt_type ()
+ && msg == comp.get_msg ())
+ return true;
+ else
+ return false;
+ }
+
+ inline Network_Clock_Tick get_tick () const
+ {
+ return tick;
+ }
+
+ inline Sci_Msg_Station_Id get_sta_id () const
+ {
+ return sta_id;
+ }
+
+ inline Network_Clock_Id get_clock_id () const
+ {
+ return clock_id;
+ }
+
+ inline Network_Clock_Type get_evt_type () const
+ {
+ return evt_type;
+ }
+
+ inline SciMsg *get_msg () const
+ {
+ return msg;
+ };
+};
+
+typedef std::list <EventExpected> list_event_t;
+
+#endif /* maximus_scheduler_utest_inc_eventexpected_h */