From 4ae35508f6b448162aa4707264895b4dc42dd0de Mon Sep 17 00:00:00 2001 From: Hanoh Haim Date: Wed, 24 Feb 2016 16:08:33 +0200 Subject: add seed per stream --- .../trex_control_plane/stl/trex_stl_lib/trex_stl_streams.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'scripts/automation/trex_control_plane/stl') diff --git a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_streams.py b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_streams.py index 127d1669..fdd330a5 100644 --- a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_streams.py +++ b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_streams.py @@ -152,6 +152,7 @@ class STLStream(object): next = None, stream_id = None, action_count = 0, + random_seed =0, mac_src_override_by_pkt=None, mac_dst_override_mode=None #see STLStreamDstMAC_xx ): @@ -163,6 +164,7 @@ class STLStream(object): validate_type('self_start', self_start, bool) validate_type('isg', isg, (int, float)) validate_type('stream_id', stream_id, (NoneType, int)) + validate_type('random_seed',random_seed,int); if (type(mode) == STLTXCont) and (next != None): raise STLError("continuous stream cannot have a next stream ID") @@ -207,6 +209,9 @@ class STLStream(object): self.fields['self_start'] = self_start self.fields['isg'] = isg + if random_seed !=0 : + self.fields['random_seed'] = random_seed # optional + # mode self.fields['mode'] = mode.to_json() self.mode_desc = str(mode) -- cgit 1.2.3-korg