summaryrefslogtreecommitdiffstats
path: root/src/stateless/cp/trex_stream.h
diff options
context:
space:
mode:
authorimarom <imarom@cisco.com>2015-10-28 14:47:56 +0200
committerimarom <imarom@cisco.com>2015-10-28 14:47:56 +0200
commit788ba38b545be2f76f290f73b16cbfc37f4fa187 (patch)
tree514d237367def26a1e57f0cfddbfa228ca460ca8 /src/stateless/cp/trex_stream.h
parentcb8bc9bda11c951b8b91a635d8d4d6df8d5a0ab8 (diff)
moved all stream compiling phase to a new file
trex_streams_compiler.cpp
Diffstat (limited to 'src/stateless/cp/trex_stream.h')
-rw-r--r--src/stateless/cp/trex_stream.h39
1 files changed, 4 insertions, 35 deletions
diff --git a/src/stateless/cp/trex_stream.h b/src/stateless/cp/trex_stream.h
index d422f9f4..c8a15240 100644
--- a/src/stateless/cp/trex_stream.h
+++ b/src/stateless/cp/trex_stream.h
@@ -37,11 +37,6 @@ class TrexRpcCmdAddStream;
*
*/
class TrexStream {
- /* provide the RPC parser a way to access private fields */
- friend class TrexRpcCmdAddStream;
- friend class TrexRpcCmdGetStream;
- friend class TrexStreamTable;
- friend class TrexStatelessPort;
public:
TrexStream(uint8_t port_id, uint32_t stream_id);
@@ -57,7 +52,7 @@ public:
/* access the stream json */
const Json::Value & get_stream_json();
-protected:
+public:
/* basic */
uint8_t m_port_id;
uint32_t m_stream_id;
@@ -150,28 +145,6 @@ protected:
};
/**
- * compiled object for a table of streams
- *
- * @author imarom (28-Oct-15)
- */
-class TrexStreamsCompiledObj {
-public:
-
- TrexStreamsCompiledObj() {}
- ~TrexStreamsCompiledObj();
-
- void add_compiled_stream(double pps, uint8_t *pkt, uint16_t pkt_len);
-
- struct obj_st {
- double m_pps;
- uint8_t *m_pkt;
- uint16_t m_pkt_len;
- };
-
- std::vector<obj_st> m_objs;
-};
-
-/**
* holds all the streams
*
*/
@@ -212,17 +185,13 @@ public:
*
* @param stream_list
*/
- void get_stream_list(std::vector<uint32_t> &stream_list);
+ void get_id_list(std::vector<uint32_t> &id_list);
/**
- * compiles all the streams in the table to a DP object that
- * can be passed to the DP cores
- *
- * @author imarom (28-Oct-15)
+ * populate a list with all the stream objects
*
- * @return bool
*/
- bool compile(TrexStreamsCompiledObj &obj);
+ void get_object_list(std::vector<TrexStream *> &object_list);
/**
* get the table size