diff options
author | imarom <imarom@cisco.com> | 2015-11-19 12:49:10 +0200 |
---|---|---|
committer | imarom <imarom@cisco.com> | 2015-11-19 12:49:10 +0200 |
commit | 76248b13906f575f709ed2270d63ec41131f4bdf (patch) | |
tree | 6b5313815b6181aed313ea6fc58b6ec311d554ea /src/stateless/cp/trex_stream.h | |
parent | a7317d45787669af71ca8c65fd1e51f8a47d2c1e (diff) | |
parent | 91a4e6cc117076d3f5d34437581f7ffe91e6892b (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/cp/trex_stream.h')
-rw-r--r-- | src/stateless/cp/trex_stream.h | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/src/stateless/cp/trex_stream.h b/src/stateless/cp/trex_stream.h index c2628cc3..0634829e 100644 --- a/src/stateless/cp/trex_stream.h +++ b/src/stateless/cp/trex_stream.h @@ -1,5 +1,6 @@ /* Itay Marom + Hanoch Haim Cisco Systems, Inc. */ @@ -65,6 +66,9 @@ public: stMULTI_BURST = 6 }; + typedef uint8_t stream_type_t ; + + static std::string get_stream_type_str(stream_type_t stream_type); public: TrexStream(uint8_t type,uint8_t port_id, uint32_t stream_id); @@ -80,6 +84,12 @@ public: /* access the stream json */ const Json::Value & get_stream_json(); + /* compress the stream id to be zero based */ + void fix_dp_stream_id(uint32_t my_stream_id,int next_stream_id){ + m_stream_id = my_stream_id; + m_next_stream_id = next_stream_id; + } + double get_pps() { return m_pps; } @@ -96,6 +106,14 @@ public: return ( m_type ); } + bool is_dp_next_stream(){ + if (m_next_stream_id<0) { + return (false); + }else{ + return (true); + } + } + void set_multi_burst(uint32_t burst_total_pkts, @@ -132,11 +150,12 @@ public: return (dp); } + void Dump(FILE *fd); public: /* basic */ uint8_t m_type; uint8_t m_port_id; - uint32_t m_stream_id; + uint32_t m_stream_id; /* id from RPC can be anything */ /* config fields */ |