Could not set default value for ns3::DropTailQueue

447 views
Skip to first unread message

amir nazari

unread,
Jun 10, 2019, 2:28:41 AM6/10/19
to ns-3-users
Hi, 

I want to run an application but I receive this error: 

msg="Could not set default value for ns3::DropTailQueue::Mode", file=../src/core/model/config.cc, line=787


this is the related part of the code: 

uint packetSize = 1.2*1024;        //1.2KB
    uint queueSizeHR = (100000*20)/packetSize;
    uint queueSizeRR = (10000*50)/packetSize;

    uint numSender = 3;

    double errorP = ERROR;


    Config::SetDefault("ns3::DropTailQueue::Mode", StringValue("QUEUE_MODE_PACKETS"));
/*
Config::SetDefault("ns3::DropTailQueue::MaxPackets", UintegerValue(queuesize));
    */

    //Creating channel without IP address
    std::cout << "Creating channel without IP address" << std::endl;
    PointToPointHelper p2pHR, p2pRR;
    p2pHR.SetDeviceAttribute("DataRate", StringValue(rateHR));
    p2pHR.SetChannelAttribute("Delay", StringValue(latencyHR));
    p2pHR.SetQueue("ns3::DropTailQueue", "MaxPackets", UintegerValue(queueSizeHR));
    p2pRR.SetDeviceAttribute("DataRate", StringValue(rateRR));
    p2pRR.SetChannelAttribute("Delay", StringValue(latencyRR));
    p2pRR.SetQueue("ns3::DropTailQueue", "MaxPackets", UintegerValue(queueSizeRR));



is there any problem with my header or installation process or something is wrong with the code? 

Thanks in advance.

Pooriya Gholipoor

unread,
Jun 10, 2019, 2:35:21 AM6/10/19
to ns-3-...@googlegroups.com
Hi dear... can you take a snapshot from your terminal with error

--
Posting to this group should follow these guidelines https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
---
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ns-3-users+...@googlegroups.com.
To post to this group, send email to ns-3-...@googlegroups.com.
Visit this group at https://groups.google.com/group/ns-3-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/ns-3-users/f6cac8b3-7a08-4696-a9d4-b5baf23c6af1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

amir nazari

unread,
Jun 10, 2019, 4:17:24 AM6/10/19
to ns-3-users
To unsubscribe from this group and stop receiving emails from it, send an email to ns-3-...@googlegroups.com.
shanp.png

amir nazari

unread,
Jun 10, 2019, 4:21:06 AM6/10/19
to ns-3-users

shanp.png

Here are the code and snapshot.
App6.cc
shanp.png

Adil Alsuhaim

unread,
Jun 11, 2019, 7:51:52 AM6/11/19
to ns-3-users
There's no attribute named "Mode" in the class DropTailQueue, or any of it's parent classes.

amritpal kaur

unread,
Jun 11, 2019, 7:54:19 AM6/11/19
to ns-3-...@googlegroups.com
How to develop cluster tree topology in NS3 

--
Posting to this group should follow these guidelines https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
---
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ns-3-users+...@googlegroups.com.

To post to this group, send email to ns-3-...@googlegroups.com.
Visit this group at https://groups.google.com/group/ns-3-users.

For more options, visit https://groups.google.com/d/optout.
--
kind regards 
Amritpal Kaur

Adil Alsuhaim

unread,
Jun 11, 2019, 8:37:45 PM6/11/19
to ns-3-users
I can't find "Mode" in ns-3.29, try an older version like ns-3.24 becaise this is probably a code written for an older ns3 version
Reply all
Reply to author
Forward
0 new messages