diff options
author | imarom <imarom@cisco.com> | 2016-08-10 17:45:36 +0300 |
---|---|---|
committer | imarom <imarom@cisco.com> | 2016-08-15 16:03:59 +0300 |
commit | ba7b5dff853a3b11b0cc2e7b29cfc1cd99e606f7 (patch) | |
tree | 25a2d72756217ef5d364a4c9b5a6e5e9a9d165a7 /src/stateless/dp/trex_stateless_dp_core.h | |
parent | ce1de344579505665b88c2d548ca8d2acc135988 (diff) |
core mask - first phase
Diffstat (limited to 'src/stateless/dp/trex_stateless_dp_core.h')
-rw-r--r-- | src/stateless/dp/trex_stateless_dp_core.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/stateless/dp/trex_stateless_dp_core.h b/src/stateless/dp/trex_stateless_dp_core.h index 31cb0be3..9babb172 100644 --- a/src/stateless/dp/trex_stateless_dp_core.h +++ b/src/stateless/dp/trex_stateless_dp_core.h @@ -83,10 +83,14 @@ public: bool update_number_of_active_streams(uint32_t d); - state_e get_state() { + state_e get_state() const { return m_state; } + bool is_active() const { + return (get_state() != ppSTATE_IDLE); + } + void set_event_id(int event_id) { m_event_id = event_id; } @@ -261,6 +265,11 @@ public: /* simply sends a message back (acts as a barrier for previous messages) */ void barrier(uint8_t port_id, int event_id); + bool is_port_active(uint8_t port_id) { + return get_port_db(port_id)->is_active(); + } + + private: void schedule_exit(); |