summaryrefslogtreecommitdiffstats
path: root/src/stateless/dp/trex_stream_node.h
diff options
context:
space:
mode:
authorimarom <imarom@cisco.com>2015-11-26 02:30:03 -0500
committerimarom <imarom@cisco.com>2015-11-26 02:30:03 -0500
commitd9a11302236095e055247295021bdfce6c988802 (patch)
treeea240260db4bddf3719a3e76aadd2ba5ae34eb10 /src/stateless/dp/trex_stream_node.h
parent12a19244693cacbd77ca0a8e43f382a10f773f91 (diff)
added support for 'update'
Diffstat (limited to 'src/stateless/dp/trex_stream_node.h')
-rw-r--r--src/stateless/dp/trex_stream_node.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/stateless/dp/trex_stream_node.h b/src/stateless/dp/trex_stream_node.h
index ccf99eaa..5997376f 100644
--- a/src/stateless/dp/trex_stream_node.h
+++ b/src/stateless/dp/trex_stream_node.h
@@ -86,8 +86,9 @@ private:
TrexStream * m_ref_stream_info; /* the stream info */
CGenNodeStateless * m_next_stream;
+ double m_base_pps;
/* pad to match the size of CGenNode */
- uint8_t m_pad_end[56];
+ uint8_t m_pad_end[48];
@@ -99,6 +100,15 @@ public:
}
+ /**
+ * calculate the time offset based
+ * on the PPS and multiplier
+ *
+ */
+ void set_multiplier(double mul) {
+ m_next_time_offset = 1.0 / (m_base_pps * mul) ;
+ }
+
/* we restart the stream, schedule it using stream isg */
inline void update_refresh_time(double cur_time){
m_time = cur_time + usec_to_sec(m_ref_stream_info->m_isg_usec);