From d9a11302236095e055247295021bdfce6c988802 Mon Sep 17 00:00:00 2001 From: imarom Date: Thu, 26 Nov 2015 02:30:03 -0500 Subject: added support for 'update' --- src/stateless/dp/trex_stream_node.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/stateless/dp/trex_stream_node.h') 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); -- cgit 1.2.3-korg