[ndnSIM] How forwarding strategy can get the nodes position

Alex Afanasyev aa at cs.fiu.edu
Wed Jul 19 06:26:28 PDT 2017


> On Jul 19, 2017, at 3:10 PM, Oleg Surnin <o.surnin at innopolis.ru> wrote:
> 
> Dear All,
> 
> I coded my own strategy and now I want to get the node position (I'm using mobility helper).
> 
> This is how I tried to get a position of the node, but it didn't work for me:
> 
> this-> GetObject<Node> ()-> GetObject<MobilityModel> ()->GetPosition ();

For ndnSIM 2.x, it is done a bit differently:

auto node = NodeList::GetNode(Simulator::GetContext());
node->GetObject<MobilityModel> ()->GetPosition();

--
Alex

> 
> 
> Best Regards,
> Oleg
> 
> 
> _______________________________________________
> ndnSIM mailing list
> ndnSIM at lists.cs.ucla.edu
> http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 841 bytes
Desc: Message signed with OpenPGP
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20170719/b5be14aa/attachment.sig>


More information about the ndnSIM mailing list