diff options
author | 2015-12-03 06:07:20 -0500 | |
---|---|---|
committer | 2015-12-06 03:57:02 -0500 | |
commit | a6af2a8e624c62d9a347215321c6562f28879d97 (patch) | |
tree | b3a90eafc7930957235cdb10250daed09f1e9fda /src/stateless/cp/trex_stateless_port.h | |
parent | 15c30aa3b73c4f8714c2e3b4aab22a154f4a8fe9 (diff) |
various fixes (each one is a minor one)
Diffstat (limited to 'src/stateless/cp/trex_stateless_port.h')
-rw-r--r-- | src/stateless/cp/trex_stateless_port.h | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/src/stateless/cp/trex_stateless_port.h b/src/stateless/cp/trex_stateless_port.h index 2d15a1cc..dbaac21d 100644 --- a/src/stateless/cp/trex_stateless_port.h +++ b/src/stateless/cp/trex_stateless_port.h @@ -76,6 +76,16 @@ public: void release(void); /** + * validate the state of the port before start + * it will return a stream graph + * containing information about the streams + * configured on this port + * + * on error it throws TrexException + */ + const TrexStreamsGraphObj *validate(void); + + /** * start traffic * throws TrexException in case of an error */ @@ -172,6 +182,7 @@ public: verify_state(PORT_STATE_IDLE | PORT_STATE_STREAMS); m_stream_table.add_stream(stream); + delete_streams_graph(); change_state(PORT_STATE_STREAMS); } @@ -180,6 +191,7 @@ public: verify_state(PORT_STATE_STREAMS); m_stream_table.remove_stream(stream); + delete_streams_graph(); if (m_stream_table.size() == 0) { change_state(PORT_STATE_IDLE); @@ -190,6 +202,7 @@ public: verify_state(PORT_STATE_IDLE | PORT_STATE_STREAMS); m_stream_table.remove_and_delete_all_streams(); + delete_streams_graph(); change_state(PORT_STATE_IDLE); } @@ -219,6 +232,12 @@ public: return (m_current_per_core_m * m_cores_id_list.size()); } + /** + * get port speed in bits per second + * + */ + uint64_t get_port_speed_bps() const; + private: @@ -269,11 +288,7 @@ private: */ double calculate_effective_mul(const TrexPortMultiplier &mul); - /** - * get port speed in bits per second - * - */ - uint64_t get_port_speed_bps(); + /** * generates a graph of streams graph |