[Mini-NDN] Consumer is not receiving the data (MiniNdn)

Vince Lehman (vslehman) vslehman at memphis.edu
Mon Feb 29 08:13:06 PST 2016


Hi Percy,

Is the script you included your entire experiment script? If not, could you please attach the full code?

Right now the experiment you attached will fail with a Python error due to an undefined variable, host.

You can access a specific host using the method that Shuo used:

for host in self.net.hosts:
    if host.name == “p”:
         host.cmd("echo test1 | ndnpoke /ndn/edu/producer &”)

Or you can access a specific node using the self.net<http://self.net> object:

    self.net<http://self.net>['p'].cmd("echo test1 | ndnpoke /ndn/edu/p &")

--
Vince Lehman

On Feb 28, 2016, at 10:46 PM, Shuo Yang <shuoyang at email.arizona.edu<mailto:shuoyang at email.arizona.edu>> wrote:

Hi Percy,

It seems that you should write the script in this way:


 1from ndn.experiments.experiment import  Experiment

 2

 3class Experiment1(Experiment):

 4    def __init__(self,args):

 5        Experiment.__init__(self, args)

 6    def run(self):

 7        for host in self.net.hosts:

 8            if host.name<http://host.name/> == "p":

 9                host.cmd("echo test1 | ndnpoke /ndn/edu/producer &")

10

11        for host in self.net.hosts:

12            if host.name<http://host.name/> == "c":

13                print host.cmd("ndnpeek -p /ndn/edu/producer")

14

15Experiment.register("peek-poke", Experiment1)

At least yours is working on my side. I'm using Mini-ndn 0.1.1


Best luck!

Shuo

On Sun, Feb 28, 2016 at 5:09 PM, Percy Perez Aruni <pdpa at st-andrews.ac.uk<mailto:pdpa at st-andrews.ac.uk>> wrote:
Hi dear MiniNdn team

I am interested in using MiniNdn for an initial basic experiment between three nodes: a consumer , a forwarder and a producer.  It is highly possible that I am missing something,  but the consumer is not receiving the data from the producer.

Could I ask for some advice of how this could be achieved by using MiniNdn?


Some details below:

1.- Topology:  c <-> f <-> p

  where  c = consumer, f = forwarder, p =producer

2.- ExperimentClass:

from ndn.experiments.experiment import  Experiment

class Experiment1(Experiment):
    def __init__(self,args):
        Experiment.__init__(self, args)
    def run(self):
        if host.name<http://host.name/> == "p":
              host.cmd("echo test1 | ndnpoke /ndn/edu/p &")
        if host.name<http://host.name/> == "c":
              print host.cmd("ndnpeek -p /ndn/edu/p")
Experiment.register("peek-poke", Experiment1)

3.- Running as root:

#./install.sh -i; minindn --experiment=peek-poke --ctime=20  ndn_utils/topologies/three-nodes.conf

4.- "NLSR has successfully converged"


Thank you in advance for your time and help

Regards
Percy

_______________________________________________
Mini-NDN mailing list
Mini-NDN at lists.cs.ucla.edu<mailto:Mini-NDN at lists.cs.ucla.edu>
http://www.lists.cs.ucla.edu/mailman/listinfo/mini-ndn


_______________________________________________
Mini-NDN mailing list
Mini-NDN at lists.cs.ucla.edu<mailto:Mini-NDN at lists.cs.ucla.edu>
http://www.lists.cs.ucla.edu/mailman/listinfo/mini-ndn

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/mini-ndn/attachments/20160229/09964f89/attachment.html>


More information about the Mini-NDN mailing list