08-27-2017 07:35 PM
Hi developers,
I need to check STLStream object on the port.
However, it seems only a dictionary of the stream info is provided.
Like this:
self.streams[stream_id] = {'next_id' | : next_id, | |
'pkt' | : streams_list[i].get_pkt(), | |
'mode' | : streams_list[i].get_mode(), | |
'rate' | : streams_list[i].get_rate(), | |
'has_flow_stats' : streams_list[i].has_flow_stats()} |
(sorry, some format error in this table. you could check the code at trex_stl_port.py 323 line)
Actually, I need the complete STLStream object through that, which seems easy to achieve.
You could just store the STLStream(streams_list[i]) in that self.streams[stream_id].
Thanks,
Yufeng.
09-03-2017 12:53 AM
Hi,
Actually, there are two directions to synchronize the streams with the port object.
You've pointed out to the easy path - saving a reference to the STLStream object while sending it to the server.
However,
We also need to save the object when syncing with the server when connecting.
I'll look into it...
Should be possible.
Thanks,
Itay
09-06-2017 11:28 AM
Hi Yufeng,
We've completed this feature.
It is currently under test and will be available from the next release.
The port will hold STLStream on both sides (when sending and when syncing with the server).
so calling get_streams() will provide the objects instead of a slim JSON version.
Thanks,
Itay
09-07-2017 02:34 AM
Thank you for your reply.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide