summaryrefslogtreecommitdiffstats
path: root/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_client.py
diff options
context:
space:
mode:
authorimarom <imarom@cisco.com>2017-01-22 15:36:20 +0200
committerimarom <imarom@cisco.com>2017-01-22 15:36:20 +0200
commitf5f92b068561dcdf8414494e5daf6d285ea24135 (patch)
tree46925eb424943781e452f1fd9ebb5bd1f1774568 /scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_client.py
parent641fed03d8e407b6dca94f5280b9a1b4c768f601 (diff)
few tweaks
Signed-off-by: imarom <imarom@cisco.com>
Diffstat (limited to 'scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_client.py')
-rwxr-xr-xscripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_client.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_client.py b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_client.py
index 5435619a..c82d77fb 100755
--- a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_client.py
+++ b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_client.py
@@ -3058,13 +3058,19 @@ class STLClient(object):
self.logger.post_cmd(rc)
raise STLError(rc)
- pkts = rc.data()['pkts']
+ pkts = rc.data()['pkts']
+ pending = rc.data()['pending']
+ start_ts = rc.data()['start_ts']
+
for pkt in pkts:
- ts = pkt['ts']
+ ts = pkt['ts'] - start_ts
+ ts_sec = int(ts)
+ ts_usec = int( (ts - ts_sec) * 1e6 )
+
pkt_bin = base64.b64decode(pkt['binary'])
- writer._write_packet(pkt_bin, sec = 0, usec = 0)
+ writer._write_packet(pkt_bin, sec = ts_sec, usec = ts_usec)
- pending = rc.data()['pending']
+
self.logger.post_cmd(rc)