[ndnSIM] Get node ID in forwarder class

Hussein AlOmaisi alomaisi2004 at yahoo.com
Tue Sep 21 03:44:04 PDT 2021


Hi HADIBI,
To get the node ID use the following code:
uint32-t currentNodeId = ns3::Simulator::GetContext();
If you want to get a pointer to the current node:
auto currentNodeObj = ns3::NodeList::GetNode(currentNodeId);
I hope it helps.
Regards,Hussein
 
 
    Send ndnSIM mailing list submissions to
    ndnsim at lists.cs.ucla.edu

To subscribe or unsubscribe via the World Wide Web, visit
    http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim
or, via email, send a message with subject or body 'help' to
    ndnsim-request at lists.cs.ucla.edu

You can reach the person managing the list at
    ndnsim-owner at lists.cs.ucla.edu

When replying, please edit your Subject line so it is more specific
than "Re: Contents of ndnSIM digest..."


Today's Topics:

  1. Get node ID in forwarder class (HADIBI ABDENNOUR)
  2. Node ID in forwarder class ndnsim2.8 (HADIBI ABDENNOUR)
  3. Re: Simulation halts with small lifetime of interest
      (sangita......)


----------------------------------------------------------------------

Message: 1
Date: Tue, 21 Sep 2021 09:47:50 +0100
From: HADIBI ABDENNOUR <emp.ifd.009.hadibi.abdennour at gmail.com>
To: ndnsim at lists.cs.ucla.edu
Subject: [ndnSIM] Get node ID in forwarder class
Message-ID:
    <CABAa30d5XkHmiq+04pvwc2Xe4hi38tW87UtHizKrwRvunLVihg at mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Hi,
i'm trying to get node ID in forwarder class using the following code :

auto node = ns3::NodeList::GetNode(ns3::Simulator::GetContext());
std::cout<<" Node ID : "<<node->GetId()<<std::endl;

It didnt work for me : error : 'ns3::NodeList' has not been declared
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20210921/a1c3a368/attachment-0001.html>

------------------------------

Message: 2
Date: Tue, 21 Sep 2021 09:49:41 +0100
From: HADIBI ABDENNOUR <emp.ifd.009.hadibi.abdennour at gmail.com>
To: ndnsim at lists.cs.ucla.edu
Subject: [ndnSIM] Node ID in forwarder class ndnsim2.8
Message-ID:
    <CABAa30d+6bKmwueE943+wtN7wLMJ9_yDpaNEoyZy1=V_NX-ygw at mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Hi,
I'm trying to get node ID in forwarder class using the following code :

auto node = ns3::NodeList::GetNode(ns3::Simulator::GetContext());
std::cout<<" Node ID : "<<node->GetId()<<std::endl;

It didnt work for me : error : 'ns3::NodeList' has not been declared

Im using ndnSim2.8

Best regards
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20210921/c0df53ef/attachment-0001.html>

------------------------------

Message: 3
Date: Tue, 21 Sep 2021 10:59:26 +0100
From: "sangita......" <sangita.engg at gmail.com>
To: Karan Raj Baruah <karan_baruah at yahoo.co.in>
Cc: "ndnsim at lists.cs.ucla.edu" <ndnsim at lists.cs.ucla.edu>
Subject: Re: [ndnSIM] Simulation halts with small lifetime of interest
Message-ID:
    <CALbsVCHrBZB39ofU6DH5MzY9rNpAqQ82YOs-0TgpdO=wxbYyag at mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Hi Karan,

Thanks for your all suggestions.  Somehow I fixed the issue by stopping the
interest generation a little before the vehicle leaves the network.
This is a dynamic network and vehicles are entering and leaving the network
randomly (not a fixed topology).

Thanks and regards,
Sangita.
------------------------------------
Sangita Dhara
Post Doctoral Fellow
CONNECT / SCSS
Trinity College Dublin
-------------------------------------


On Sat, Sep 18, 2021 at 8:16 PM Karan Raj Baruah <karan_baruah at yahoo.co.in>
wrote:

>
> Hello,
>
> onDataUnsolicited() is occured as there is no PIT entry in the node/face
> for the data and hence data is discarded. It seems this happens with
> most/all of the packets and as a result the simulation halts(as all data is
> quickly discarded). I think your only option for now is to increase the
> lifetime of the interest packets as the latency between the nodes is just
> too high (as per my understanding). Not sure of any other way to "fix" it
> for now.
>
> Best,
> Karan
> On Thursday, 16 September, 2021, 07:20:47 pm IST, sangita...... <
> sangita.engg at gmail.com> wrote:
>
>
> Hi Karan,
>
> I don't have anything such as MaxSeq as my consumer generating data as per
> Zipf Mandelbrot distribution. Here I have mentioned the Number of Content
> and the interest is generated following Mandelbrot distribution.
> By analysising the trace file I have seen that the simulation is stopped
> after repetadely executing the function onDataUnsolicited( ) from forwarder
> class.  This is because  timeout happens as for the very small lifetime of
> interest and on timeout I did not generating the interest again. Therefore,
> even when the data is coming back it becomes unsolicited in the nodes and
> decision was to drop the data.
>
> But again I m not getting the reason of stimulation halt. Do you have any
> idea on how an unsolicited data can make the simulation halt.
>
> Thanks and regards,
> Sangita
>
>
> On Wed, Sep 15, 2021, 22:45 Karan Raj Baruah <karan_baruah at yahoo.co.in>
> wrote:
>
> Hello Sangita,
>
> Did you set "MaxSeq" variable in your simulation scenario? It could be
> that the MaxSeq value is hit when transmitting (and there are NACKs in the
> network even after re-transmission) and simulation closes. Also, if you are
> using something like WifiRemoteStation there are two variables MaxSsrc or
> MaxSlrc(depends on the packet size you used) that sets max number of
> re-transmissions for data packets which may be causing simulation to
> shutdown as none of the packets are not reaching even after repeated
> timeouts. Check this class once:
> https://www.nsnam.org/doxygen/classns3_1_1_wifi_remote_station_manager.html
>
> Might be some other issue also but hard to say without knowing scenario.
>
> Best,
> Karan Raj Baruah
>
> On Thursday, 16 September, 2021, 02:04:17 am IST, sangita...... <
> sangita.engg at gmail.com> wrote:
>
>
> Hi Karan,
> Thanks for the reply.
>
>  I kept the lifetime as 10 seconds. Your words are true that my interest
> are not reaching to any producer (destination) but as per my understanding
> that should not halt the simulation in the midway. When a interest will not
> reach to any producer , time out will happen and pit entry for those
> intereste will be evicted.
>
> Do you have a clear idea what actually happened when a time out take place
> ?
>
> Thanks and regards,
> Sangita
>
> On Wed, Sep 15, 2021, 20:47 Karan Raj Baruah via ndnSIM <
> ndnsim at lists.cs.ucla.edu> wrote:
>
> Hello Sangita,
>
> How much is the value of lifetime that you set when causing the issues?
> Also, when you set the lifetime manually can you verify from your tracer
> logs that the packets are actually sent(and duration for interest to
> reach)? It might be because latency between ports is too high that when you
> change it the interest may not reach the destination at all(even on
> retransmission).
>
> Best,
> Karan
>
>
>
>
>
>
>
>
>
> On Thursday, 16 September, 2021, 12:30:08 am IST,
> ndnsim-request at lists.cs.ucla.edu <ndnsim-request at lists.cs.ucla.edu>
> wrote:
>
> Message: 2
> Date: Wed, 15 Sep 2021 11:11:04 +0100
> From: "sangita......" <sangita.engg at gmail.com>
> To: ndnsim at lists.cs.ucla.edu
> Subject: [ndnSIM] Simulation halts with small lifetime of interest
> Message-ID:
>    <CALbsVCFQgTWn9VaK8sW-n1ftoGZ+s4t7URoV9r9F7j_HemJMqw at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Dear members,
> I am developing a vehicular network by incorporating sumo in ndnsim using
> the traci client.
> In my simulation the consumer generates interest in some zipf-mandelbroute
> fashion. Whenever I am keeping life time of each interest smaller than the
> total simulation time, somewhere my simulation halts with the below
> message:
> Error: tcpip::Socket::recvAndCheck @ recv: peer shutdown
> Quitting (on error).
>
> However, it runs fine when I keep the lifetime of each interest bigger than
> the total simulation time.
>
> Can anyone give me any clue on what can be the problem?
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20210915/5df3373e/attachment-0001.html
> >
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> ndnSIM mailing list
> ndnSIM at lists.cs.ucla.edu
> http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim
>
>
> ------------------------------
>
> End of ndnSIM Digest, Vol 106, Issue 7
> **************************************
> _______________________________________________
> ndnSIM mailing list
> ndnSIM at lists.cs.ucla.edu
> http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20210921/c8adfd2b/attachment.html>

------------------------------

Subject: Digest Footer

_______________________________________________
ndnSIM mailing list
ndnSIM at lists.cs.ucla.edu
http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim


------------------------------

End of ndnSIM Digest, Vol 106, Issue 12
***************************************
  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20210921/5085399e/attachment-0001.html>


More information about the ndnSIM mailing list