[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: colors in Nam
> I wounder how commands like:
> $ns set color 0 blue
> $ns set color 1 red
> $ns set color 2 yellow
> $ns set color 3 green ....
> affects the colors of the datapackets in the nam visualization? I
> noticed that changing the flowid_ to 3 makes the packages green in my example.
> In my sense of thinking there must be other reasons when you want to
> color packages in diffrent colors, than when they belong to diffrent
> flows according to ipv6, I've run most of the testcripts and
> noticed they are very colorfull.
In nam trace file, every packet have an 'attribute' field, which is
produced by 'fid_' of data sources in your simulation scripts. The colors
defined by above commands builds a 1-1 mapping between colors to the
'fid's. Therefore, you may change the fid_ of your packets as a means to
label them with different colors.
You may find the details of nam trace file format in nam's man page.
Please let me know if you have further questions.
Regards,
Haobo