summaryrefslogtreecommitdiffstats
path: root/src/stateless/messaging/trex_stateless_messaging.h
diff options
context:
space:
mode:
authorimarom <imarom@cisco.com>2015-11-19 12:49:10 +0200
committerimarom <imarom@cisco.com>2015-11-19 12:49:10 +0200
commit76248b13906f575f709ed2270d63ec41131f4bdf (patch)
tree6b5313815b6181aed313ea6fc58b6ec311d554ea /src/stateless/messaging/trex_stateless_messaging.h
parenta7317d45787669af71ca8c65fd1e51f8a47d2c1e (diff)
parent91a4e6cc117076d3f5d34437581f7ffe91e6892b (diff)
Merge branch 'master' of csi-sceasr-b45:/auto/proj-pcube-b/apps/PL-b/tools/repo//trex-core
Conflicts: src/stateless/cp/trex_streams_compiler.h src/stateless/dp/trex_stateless_dp_core.cpp src/stateless/dp/trex_stateless_dp_core.h src/stateless/messaging/trex_stateless_messaging.cpp src/stateless/messaging/trex_stateless_messaging.h
Diffstat (limited to 'src/stateless/messaging/trex_stateless_messaging.h')
-rw-r--r--src/stateless/messaging/trex_stateless_messaging.h32
1 files changed, 31 insertions, 1 deletions
diff --git a/src/stateless/messaging/trex_stateless_messaging.h b/src/stateless/messaging/trex_stateless_messaging.h
index 3fb1ef84..445e9378 100644
--- a/src/stateless/messaging/trex_stateless_messaging.h
+++ b/src/stateless/messaging/trex_stateless_messaging.h
@@ -37,6 +37,7 @@ class TrexStatelessCpToDpMsgBase {
public:
TrexStatelessCpToDpMsgBase() {
+ m_quit_scheduler=false;
}
virtual ~TrexStatelessCpToDpMsgBase() {
@@ -51,11 +52,21 @@ public:
*/
virtual TrexStatelessCpToDpMsgBase * clone() = 0;
+ /* do we want to quit scheduler, can be set by handle function */
+ void set_quit(bool enable){
+ m_quit_scheduler=enable;
+ }
+
+ bool is_quit(){
+ return ( m_quit_scheduler);
+ }
+
/* no copy constructor */
TrexStatelessCpToDpMsgBase(TrexStatelessCpToDpMsgBase &) = delete;
protected:
- int m_event_id;
+ int m_event_id;
+ bool m_quit_scheduler;
};
/**
@@ -118,6 +129,24 @@ public:
};
+/**
+ * a message to check if both port are idel and exit
+ *
+ * @author hhaim
+ */
+class TrexStatelessDpCanQuit : public TrexStatelessCpToDpMsgBase {
+public:
+
+ TrexStatelessDpCanQuit() {
+ }
+
+ virtual bool handle(TrexStatelessDpCore *dp_core);
+
+ virtual TrexStatelessCpToDpMsgBase * clone();
+};
+
+
+
/************************* messages from DP to CP **********************/
/**
@@ -145,6 +174,7 @@ public:
};
+
/**
* a message indicating an event has happened on a port at the
* DP