[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

seq_no in cbr_traffic



we want to use seqno_ to record how many host packets sent out in one node.

In procedure:
double CBR_Traffic::next_interval(int& size)
{
......
        if (++seqno_ < maxpkts_)
.....
}

seqno_ gets increased every time it enters into this procedure. BUt next 
time it enters the same procedure, before it gets increased,  we checked 
its value, it is 0. so It must be reset to 0 somewhere sometime for some 
reason.

COuld someone please explain to  me why it is reset outside this 
procedure? 
I am also wondering if this a good approach to use the variable in 
cbr_traffic or in NODE to get statistics datas. or It makes more sense to 
parse the trace file, if that is true, I would like to hear the reason. ( 
I have reason to against it: parsing trace takes seperate running to parse 
the trace file, takes more time.) 

Thanks in advance!
yan