cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
999
Views
0
Helpful
3
Replies

Require get the complete STLStream through the port

yufenwan
Level 1
Level 1

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.

3 Replies 3

imarom
Cisco Employee
Cisco Employee

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

imarom
Cisco Employee
Cisco Employee

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

Thank you for your reply.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: