[Mini-NDN] Consumer is not receiving the data (MiniNdn)
    Shuo Yang 
    shuoyang at email.arizona.edu
       
    Sun Feb 28 20:46:15 PST 2016
    
    
  
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 == "p":
 9                host.cmd("echo test1 | ndnpoke /ndn/edu/producer &")
10
11        for host in self.net.hosts:
12            if 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>
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 == "p":
>               host.cmd("echo test1 | ndnpoke /ndn/edu/p &")
>         if 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
> 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/20160228/3be5fa3d/attachment.html>
    
    
More information about the Mini-NDN
mailing list