Unable to create CoDelQueue object

12 views
Skip to first unread message

Esteban . Coma

unread,
Mar 13, 2015, 10:09:31 AM3/13/15
to ns-3-...@googlegroups.com
Hello everyone,

I was just developing a simple code that uses two types of queues: DropTailQueue and CoDelQueue.
In this small piece of code:

Ptr<Queue> qt;
if ( qtype == "droptail" ) {
//Create a DropTailQueue
qt = CreateObject<DropTailQueue> (); 
//DropTailQueue uses packets by default.
}
else if ( qtype == "codel" ){
//Create a CoDelQueue
qt = CreateObject<CoDelQueue> ();
qt->SetAttribute("Mode", EnumValue(Queue::QUEUE_MODE_PACKETS)); //bytes by default
}
else {
NS_LOG_ERROR ("ERROR: queue type not supported");
    exit(-1);
}


When I indicate by command line that I want it to create a codel queue, it fails with this error:

../myscripts/simulation2/simulation2.cc: In function ‘int main(int, char**)’:
../myscripts/simulation2/simulation2.cc:151:21: error: ‘CoDelQueue’ was not declared in this scope
   qt = CreateObject<CoDelQueue> ();


And I have no idea why, when creating a DropTailQueue the simulation works fine, and they both inherit from ns3::Queue so it should work.

Thank you.
Reply all
Reply to author
Forward
0 new messages