[ndnSIM] Random Producer/consumer
Dhiab Imen
dhiabimen at gmail.com
Thu Oct 8 03:34:27 PDT 2015
Hi ,
there is any one who can tell me how can I change my producer node randomly
at every simulation.
I try to use rand():
NodeContainer c; // NodeContainer
c.Create (4);
int a=1+rand()%3 // to generate an integer between 1 and 4
producerHelper.Install (c.Get (a));
but when I want to display the value of a
std::cout << "a = " << a <<"\n";
I have the same value even when I re-simulate my code.
thnx a lot.
--
Cordialement
Imen Dhiab
***************************************************************************************************
Ingénieur Informatique diplômé de l'Ecole Nationale d'Ingénieurs de Sfax.
Membre de l'unité de recherche SAGE (Systèmes Avancés en Génie Electrique),
Ecole Nationale d'Ingénieurs de Sousse.
+216 53 59 19 88
Pages personnelles :
http://www.sage-eniso.org/profile-membre/fr/T/85/dhiab-imene.html
***************************************************************************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20151008/abcb4431/attachment.html>
More information about the ndnSIM
mailing list