Bug 2825

Summary: vanet-routing-compare can not track Tx packets (and more).
Product: ns-3 Reporter: Tommaso Pecorella <tommaso.pecorella>
Component: wave moduleAssignee: ns-bugs <ns-bugs>
Status: CONFIRMED ---    
Severity: major    
Priority: P3    
Version: ns-3-dev   
Hardware: All   
OS: All   
Attachments: preliminary patch

Description Tommaso Pecorella 2017-11-18 19:48:10 EST
In the example there are two places where the code is not congruent.

ONE:
void
VanetRoutingExperiment::ConfigureDefaults ()
{
  Config::SetDefault ("ns3::OnOffApplication::PacketSize",StringValue ("64"));
  Config::SetDefault ("ns3::OnOffApplication::DataRate",  StringValue (m_rate));

... but there's no OnOffApplication in the code. Instead, BsmApplication is used.

TWO:
void
VanetRoutingExperiment::ConfigureApplications ()
[...]
  oss << "/NodeList/*/ApplicationList/*/$ns3::OnOffApplication/Tx";
  Config::Connect (oss.str (), MakeCallback (&RoutingHelper::OnOffTrace, m_routingHelper));
}

Again, no OnOffApplication in the code.

The second point requires more changes in the code because BsmApplication doesn't have any "Tx" trace.

This has been spotted in this thread:
https://groups.google.com/forum/#!topic/ns-3-users/jeZ8Zpx6Pqg
Comment 1 Tommaso Pecorella 2017-11-18 20:32:23 EST
Created attachment 2961 [details]
preliminary patch

The patch still doesn't work, but there are more issues.

The MAC/PHY overhead is totally wrong. In the original code it gave numbers around 3000 (impossible for a ratio).
It was an unsigned int subtraction round problem. Fixing it gives a negative number, and this means that the calc is wrong to the boots. Practically it's getting numbers from questionable sources.

Some real work is needed (and tbh I don't have much spare time).

The current issues are:
1) I had to remove the "rate" parameter from the example. BsmApplication is fixed-rate.
2) The Trace I added isn't hooked properly.
3) The statistics are really messed up. We need to double check them.