[ndnSIM] Location tag

Alex Afanasyev aa at CS.UCLA.EDU
Thu Mar 30 05:30:55 PDT 2017


NS-3 Tags are a bit challenge to use.  I have suspicion that you're trying to add a duplicate tag of the same time.  In your OnData, try removing tag in OnData prior to adding it (or remove it when it exists).

---
Alex

> On Mar 26, 2017, at 10:33 PM, Thiago Teixeira <tteixeira at engin.umass.edu> wrote:
> 
> ** update **
> 
> I was able to make tagging work. I’m adding the tags in the producer and consumer applications, and reading the tags in the Face by using PeekPacketTag. The program crashes in the middle, however. I ran under gdb and got this error:
>  
>> In SEND() - Tag is OK, distance is 0.614296
> 0.000376375 In SEND() - Node 10 sends DATA. Position: 115.358 , 469.604
> assert failed. cond="cur->tid != tag.GetInstanceTypeId ()", file=../src/network/model/packet-tag-list.cc, line=250
> terminate called without an active exception
>  
> Program received signal SIGABRT, Aborted.
> 0x00007fffed3f8428 in __GI_raise (sig=sig at entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
> 54           ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
> (gdb)
>  
>  
> Do you have any pointers?
>  
> Thanks,
> Thiago
>  
>  
> From: Thiago Teixeira 
> Sent: Saturday, March 25, 2017 5:20 PM
> To: 'ndnsim at lists.cs.ucla.edu' <ndnsim at lists.cs.ucla.edu>
> Subject: Location tag
>  
> Hi,
>  
> I am tweaking an older implementation of a Face and a Forwarding Strategy that uses ndnSIM 1.0. I want the sender to add its location in the Interest packet and the custodian to also add its location in the Data packet (see figure below). I borrowed the GeoTag class from the car-2-car implementation.
>   __                             __                      __
> | C |                         | R |                  | P |              
>     |_____________|   |__________|
> Add InterestTag      Read Tag            Add DataTag
>  
> A segment of the forwarding strategy code is attached, where I’m adding the tags to Interest and Data packets. The Face code is also attached, where I want the intermediate nodes to read the tags and do some actions.
>  
> Position is being read correctly, but tag seems to be printed always 1.
>  
> In SEND() - Consumer sends INTEREST Position: 37.3333 , 426.895
>> In OnInterest()  Position is: 87.9029:346.258:0.964829 Tag is: 1
>> Tag not found
>> In OnData()  Position is: 87.9003:346.255:0.964829 Tag is: 1
>>  
> Can you help please? 
> Is the OnData() and OnInterest() the right place to add the tags?
>  
> Thank you!
> _______________________________________________
> ndnSIM mailing list
> ndnSIM at lists.cs.ucla.edu
> http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim




More information about the ndnSIM mailing list