Wifi: log collision

649 views
Skip to first unread message

francesco

unread,
Jan 30, 2009, 7:17:28 AM1/30/09
to ns-3-users
Hi,

Is there a predefined tracepoint where I should attach to log wifi
collisions? If not, where should I create one?

Thanks,

Francesco

francesco

unread,
Feb 17, 2009, 3:01:43 AM2/17/09
to ns-3-users
Ok, let me try again ;)

Would src/devices/wifi/dca-txop.cc:457 (in correspondence to "MY_DEBUG
("collision")") be a good idea?

Mathieu Lacage

unread,
Feb 17, 2009, 3:46:13 AM2/17/09
to ns-3-...@googlegroups.com
On Tue, 2009-02-17 at 00:01 -0800, francesco wrote:
> Ok, let me try again ;)

opps, I missed your first email.

> Would src/devices/wifi/dca-txop.cc:457 (in correspondence to "MY_DEBUG
> ("collision")") be a good idea?

Well, it really depends on what you define as being a collision but this
debug statement will be triggered when the user has just requested
access to the medium, that the backoff count has reached zero and that
the medium is busy.

regards,
Mathieu

francesco

unread,
Feb 17, 2009, 4:00:56 AM2/17/09
to ns-3-users
Thanks for the answer!

> Well, it really depends on what you define as being a collision but this
> debug statement will be triggered when the user has just requested
> access to the medium, that the backoff count has reached zero and that
> the medium is busy.

I am just interested in an indication that "the medium is becoming
crowdy", so I guess that that debug statement would be enough.
Maybe you can suggest a more meaningful name (i.e. than just
"Collision") for the trace source, so that it can be more generally
useful?

Mathieu Lacage

unread,
Feb 17, 2009, 4:07:06 AM2/17/09
to ns-3-...@googlegroups.com
On Tue, 2009-02-17 at 01:00 -0800, francesco wrote:

> > Well, it really depends on what you define as being a collision but this
> > debug statement will be triggered when the user has just requested
> > access to the medium, that the backoff count has reached zero and that
> > the medium is busy.
>
> I am just interested in an indication that "the medium is becoming
> crowdy", so I guess that that debug statement would be enough.

A decent indicator of this is the percentage of busy time on the medium
which you could calculate from the PHY trace events. I remember seeing
papers which inferred stuff from that busy/idle ratio. Don't ask me
which.

Mathieu

francesco

unread,
Feb 17, 2009, 4:27:07 AM2/17/09
to ns-3-users
Sorry, I was not clear, I meant "the medium is crowdy _and stations
have trouble accessing it". If there are just two hosts tranferring
some huge amount of tata the medium will be busy for most of the time,
but no (or few) "collisions" take place.

Btw, which is the trace-path of DcaTxop? It is not stated in the
doxygen online pages...

Mathieu Lacage

unread,
Feb 17, 2009, 4:31:43 AM2/17/09
to ns-3-...@googlegroups.com
On Tue, 2009-02-17 at 01:27 -0800, francesco wrote:

> Btw, which is the trace-path of DcaTxop? It is not stated in the

There is none because m_dca is not declared as an attribute in
nqap-wifi-mac.cc, nqsta-wifi-mac.cc and adhoc-wifi-mac.cc

You need something like this (untested):

.AddAttribute ("DcaTxop", "XXX",
PointerValue (),
MakePointerAccessor (&NqstaWifiMac::DoGetDcaTxop),
MakePointerChecker<DcaTxop> ())


regards,
Mathieu

francesco

unread,
Feb 17, 2009, 6:46:56 AM2/17/09
to ns-3-users
I have opted for MediumBusy as a trace name.
http://www.nsnam.org/bugzilla/show_bug.cgi?id=500
Reply all
Reply to author
Forward
0 new messages