[ndnSIM] TransmittedContentObjects Callback

Cesar Ghali cghali at uci.edu
Sat Mar 30 02:02:33 PDT 2013


Hi Alex,

That actually worked. Both code lines that you suggested worked. The 
reason is that I did not know the proper format of the path parameter of 
the Config::Connect function.

Thanks for the help.

Regards,
Cesar


On 03/29/2013 08:18 PM, Alex Afanasyev wrote:
> Hi Cesar,
>
> It is always helpful if you can give a scenario file (an excerpt from 
> it), which will help to reproduce the problem.
>
> For this particular case, I see that you have a small problem with 
> connecting the trace. The application that is installed on the node is 
> not "aggregated" to a node object, meaning that 
> "/NodeList/*/$ns3::ndn::Producer" will not find anything.  Instead, 
> you should do something like this:
> Config::Connect("/NodeList/*/ApplicationList/*/TransmittedContentObjects",  MakeCallback(ContentTransmitted))
> (instead of *, you can put specific node id and application id)
>
> If you want, you can always to constrain your trace only to producer 
> applications, like this:
> Config::Connect("/NodeList/*/ApplicationList/*/$ns3::ndn::Producer/TransmittedContentObjects",  
>                   MakeCallback(ContentTransmitted))
>
> Let me know if it is still not working.
>
> ---
> Alex
>
> On Mar 29, 2013, at 7:50 PM, Cesar Ghali <cghali at uci.edu 
> <mailto:cghali at uci.edu>> wrote:
>
>> Hello,
>>
>> I am new to ndnSIM and the answer to my question might be simple but 
>> I have been trying for the last couple of hours with no success. I am 
>> using this code to connect the TransmittedContentObjects to function 
>> ContentTransmitted. This function only prints "sent".
>>
>> Config::Connect 
>> ("/NodeList/*/$ns3::ndn::Producer/TransmittedContentObjects", 
>> MakeCallback (ContentTransmitted));
>>
>> However, this does not seem to work since "sent" is not printed. My 
>> ndnSIM setup is as the instructions on this page 
>> https://github.com/cawka/ndnSIM-scenario-template/blob/master/README.md
>>
>> Thanks for your help,
>> Cesar
>> _______________________________________________
>> ndnSIM mailing list
>> ndnSIM at lists.cs.ucla.edu <mailto: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/20130330/6a2324a3/attachment.html>


More information about the ndnSIM mailing list