[ndnSIM] How to get queue length from outface in ndnSIM2.3

Alex Afanasyev aa at CS.UCLA.EDU
Fri Feb 10 00:15:06 PST 2017


> On Feb 9, 2017, at 7:30 PM, Vay <158678408 at qq.com> wrote:
> 
> Hi All:
> 
> I  can get the queue length from an outface in ndnSIM2.0, but something has changed from the version 2.2, which causes my code does not work. 
> In ndnSIM2.0 there are NetDeviceFace, but in version 2.3, this class is replaced with NetDeviceTransport. Now I can not get the queue length from an outFace in ndnSIM2.3?

Hi Vay,

It is similar, but just a little bit more indirect:

nfd::Face face;
auto& transport = dynamic_cast<NetDeviceTransport>(face->getTransport())
if (transport != nullptr) {
   transport->GetNetDevice() ...  // and the rest the same as before
}
// else it is not a NetDevice-based face

Sincerely,
Alex




More information about the ndnSIM mailing list