[ndnSIM] Getting hold on the face object

Alex Afanasyev aa at CS.UCLA.EDU
Fri Feb 26 01:00:35 PST 2016


Hi Ayush,

What is "this" in your code?

ndn::Face is not "Object" and is definitely not aggregated (in NS-3 terms) with any other object.  Therefore, you cannot call GetObject<ndn::Face>().  Depending on what "this" represents, there should be a path to get hold of the face (get NetDevice,  get Node,  from Node, get L3Protocol, from L3Protocol find NetDeviceFace that corresponds to NetDevice).

--
Alex

> On Feb 17, 2016, at 9:49 PM, Ayush Agarwal <ayush0071 at gmail.com> wrote:
> 
> Hello everyone,
> I am trying to get hold of the face on which the currently used ns-3 queue is installed by creating its object as follows:
> 
> Ptr<ndn::Face> congface = this->GetObject<ndn::Face>();
>  uint32_t fid=congface->GetId();
> 
> But it is throwing the following error on building.
> 
>  ./libns3-dev-network-optimized.so: undefined reference to `ns3::ndn::Face::GetTypeId()'
> ./libns3-dev-network-optimized.so: undefined reference to `typeinfo for ns3::ndn::Face'
> collect2: error: ld returned 1 exit status
> Can I get an idea where I am making a mistake.
> 
> 
> Thanks & Regards,
> Ayush Agarwal
> Post Graduate Student,
> NITK- Surathkal, India.

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


More information about the ndnSIM mailing list