nfd::tools::nfdc::FibModule Class Reference

Provides access to NFD FIB management. More...

#include <tools/nfdc/fib-module.hpp>

+ Inheritance diagram for nfd::tools::nfdc::FibModule:
+ Collaboration diagram for nfd::tools::nfdc::FibModule:

Public Member Functions

void fetchStatus (ndn::nfd::Controller &controller, const std::function< void()> &onSuccess, const ndn::nfd::DatasetFailureCallback &onFailure, const CommandOptions &options) override
 Collect status from NFD. More...
 
void formatItemText (std::ostream &os, const FibEntry &item) const
 Format a single status item as text. More...
 
void formatItemXml (std::ostream &os, const FibEntry &item) const
 Format a single status item as XML. More...
 
void formatStatusText (std::ostream &os) const override
 Format collected status as text. More...
 
void formatStatusXml (std::ostream &os) const override
 Format collected status as XML. More...
 

Detailed Description

Provides access to NFD FIB management.

See also
https://redmine.named-data.net/projects/nfd/wiki/FibMgmt

Definition at line 42 of file fib-module.hpp.

Member Function Documentation

◆ fetchStatus()

void nfd::tools::nfdc::FibModule::fetchStatus ( ndn::nfd::Controller &  controller,
const std::function< void()> &  onSuccess,
const ndn::nfd::DatasetFailureCallback &  onFailure,
const CommandOptions &  options 
)
overridevirtual

Collect status from NFD.

Precondition
no other fetchStatus is in progress
Parameters
controllera controller through which StatusDataset can be requested
onSuccessinvoked when status has been collected into this instance
onFailurepassed to controller.fetch
optionspassed to controller.fetch

Implements nfd::tools::nfdc::Module.

Definition at line 34 of file fib-module.cpp.

◆ formatItemText()

void nfd::tools::nfdc::FibModule::formatItemText ( std::ostream &  os,
const FibEntry &  item 
) const

Format a single status item as text.

Parameters
osoutput stream
itemstatus item

Definition at line 86 of file fib-module.cpp.

◆ formatItemXml()

void nfd::tools::nfdc::FibModule::formatItemXml ( std::ostream &  os,
const FibEntry &  item 
) const

Format a single status item as XML.

Parameters
osoutput stream
itemstatus item

Definition at line 58 of file fib-module.cpp.

◆ formatStatusText()

void nfd::tools::nfdc::FibModule::formatStatusText ( std::ostream &  os) const
overridevirtual

Format collected status as text.

Precondition
fetchStatus has been successful
Parameters
osoutput stream

Implements nfd::tools::nfdc::Module.

Definition at line 77 of file fib-module.cpp.

◆ formatStatusXml()

void nfd::tools::nfdc::FibModule::formatStatusXml ( std::ostream &  os) const
overridevirtual

Format collected status as XML.

Precondition
fetchStatus has been successful
Parameters
osoutput stream

Implements nfd::tools::nfdc::Module.

Definition at line 48 of file fib-module.cpp.