diff options
author | Hanoh Haim <hhaim@cisco.com> | 2015-11-22 13:02:08 +0200 |
---|---|---|
committer | Hanoh Haim <hhaim@cisco.com> | 2015-11-22 13:02:08 +0200 |
commit | 3408c03067a85789b2128352fdc2343ab707ae32 (patch) | |
tree | 1d9d1f116ce698240c4e77d2a4ea898b4c568953 /src/stateless/messaging/trex_stateless_messaging.h | |
parent | 36dc8ea51adffce882e542123111baad7a1a7ea7 (diff) |
fix stop on duration per port
Diffstat (limited to 'src/stateless/messaging/trex_stateless_messaging.h')
-rw-r--r-- | src/stateless/messaging/trex_stateless_messaging.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/src/stateless/messaging/trex_stateless_messaging.h b/src/stateless/messaging/trex_stateless_messaging.h index 2fb5a024..afa5953a 100644 --- a/src/stateless/messaging/trex_stateless_messaging.h +++ b/src/stateless/messaging/trex_stateless_messaging.h @@ -27,6 +27,7 @@ limitations under the License. class TrexStatelessDpCore; class TrexStreamsCompiledObj; +class CFlowGenListPerThread; /** * defines the base class for CP to DP messages @@ -61,6 +62,10 @@ public: return ( m_quit_scheduler); } + /* this node is called from scheduler in case the node is free */ + virtual void on_node_remove(){ + } + /* no copy constructor */ TrexStatelessCpToDpMsgBase(TrexStatelessCpToDpMsgBase &) = delete; @@ -103,14 +108,50 @@ class TrexStatelessDpStop : public TrexStatelessCpToDpMsgBase { public: TrexStatelessDpStop(uint8_t port_id) : m_port_id(port_id) { + m_stop_only_for_event_id=false; + m_event_id=0; + m_core = NULL; } virtual TrexStatelessCpToDpMsgBase * clone(); + virtual bool handle(TrexStatelessDpCore *dp_core); + void set_core_ptr(CFlowGenListPerThread * core){ + m_core = core; + } + + CFlowGenListPerThread * get_core_ptr(){ + return ( m_core); + } + + + void set_event_id(int event_id){ + m_event_id = event_id; + } + + void set_wait_for_event_id(bool wait){ + m_stop_only_for_event_id = wait; + } + + virtual void on_node_remove(); + + + bool get_is_stop_by_event_id(){ + return (m_stop_only_for_event_id); + } + + int get_event_id(){ + return (m_event_id); + } + private: uint8_t m_port_id; + bool m_stop_only_for_event_id; + int m_event_id; + CFlowGenListPerThread * m_core ; + }; /** |