<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Hi Nilicy,</div><div><br></div><div>You can use ndn::L3Protocol interface (<a href="http://ndnsim.net/doxygen/classns3_1_1ndn_1_1_l3_protocol.html#a9d1161fc700b8a4fd793c4ff5644a6af">http://ndnsim.net/doxygen/classns3_1_1ndn_1_1_l3_protocol.html#a9d1161fc700b8a4fd793c4ff5644a6af</a>) to convert face id to Ptr<Face>, assuming that you're trying to convert node's face id to Ptr<Node> (otherwise it would not make sense).  For example, you can do a following:</div><div><br></div><div>// input: int faceId;</div><div><br></div><div>Ptr<ndn::L3Protocol> ndn = ?; // depending on where you're calling, you may use this->GetObject<ndn::L3Protocol> ();</div><div><br></div><div>Ptr<ndn::Face> face = ndn->GetFaceById (faceId);</div><div><br></div><div>---</div><div>Alex</div><div><br></div><div><div>On Apr 10, 2013, at 7:21 PM, 王楠 <<a href="mailto:youshou_wy@126.com">youshou_wy@126.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="line-height: 1.7; font-size: 14px; font-family: arial; "><div style="line-height: 1.7; font-family: arial; font-size: 14px; ">
<div>Hi<font face="Verdana">  Alex,</font><font face="Verdana">    </font></div>
<div><pre style="line-height: normal; widows: 2; text-transform: none; font-variant: normal; font-style: normal; text-indent: 0px; white-space: pre-wrap; orphans: 2; letter-spacing: normal; font-weight: normal; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; ">        I add few new bits in the Interest , and  these bits are to store some Face Id.  I wanna add a new  FIB entry using</pre><pre style="line-height: normal; widows: 2; text-transform: none; font-variant: normal; font-style: normal; text-indent: 0px; white-space: pre-wrap; orphans: 2; letter-spacing: normal; font-weight: normal; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><em><span style="COLOR: #ff0000">m_fib->Add ((header->GetName()), inFace, metric),</span> </em>but how can I generate a Ptr<Face> face when i only have the </pre><pre style="line-height: normal; widows: 2; text-transform: none; font-style: normal; text-indent: 0px; white-space: pre-wrap; orphans: 2; letter-spacing: normal; font-weight: normal; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; ">Face ID ?</pre><pre style="line-height: normal; widows: 2; text-transform: none; font-variant: normal; font-style: normal; text-indent: 0px; white-space: pre-wrap; orphans: 2; letter-spacing: normal; font-weight: normal; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; ">        Thanks</pre><pre style="line-height: normal; widows: 2; text-transform: none; font-variant: normal; font-style: normal; text-indent: 0px; white-space: pre-wrap; orphans: 2; letter-spacing: normal; font-weight: normal; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "> </pre><pre style="line-height: normal; widows: 2; text-transform: none; font-variant: normal; text-indent: 0px; white-space: pre-wrap; orphans: 2; letter-spacing: normal; font-weight: normal; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; ">                                                                                                                     Nilicy<br></pre></div>
</div></div></blockquote></div><br></body></html>