nfd::tools::nfdc::ForwarderGeneralModule Class Reference

provides access to NFD forwarder general status More...

#include <tools/nfdc/forwarder-general-module.hpp>

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

Public Member Functions

void fetchStatus (Controller &controller, const std::function< void()> &onSuccess, const Controller::DatasetFailCallback &onFailure, const CommandOptions &options) override
 collect status from NFD 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...
 

Static Public Member Functions

static void formatItemText (std::ostream &os, const ForwarderStatus &item)
 format a single status item as text More...
 
static void formatItemXml (std::ostream &os, const ForwarderStatus &item)
 format a single status item as XML More...
 

Detailed Description

provides access to NFD forwarder general status

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

Definition at line 40 of file forwarder-general-module.hpp.

Member Function Documentation

void nfd::tools::nfdc::ForwarderGeneralModule::fetchStatus ( Controller &  controller,
const std::function< void()> &  onSuccess,
const Controller::DatasetFailCallback &  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 36 of file forwarder-general-module.cpp.

void nfd::tools::nfdc::ForwarderGeneralModule::formatItemText ( std::ostream &  os,
const ForwarderStatus &  item 
)
static

format a single status item as text

Parameters
osoutput stream
itemstatus item

Definition at line 106 of file forwarder-general-module.cpp.

void nfd::tools::nfdc::ForwarderGeneralModule::formatItemXml ( std::ostream &  os,
const ForwarderStatus &  item 
)
static

format a single status item as XML

Parameters
osoutput stream
itemstatus item

Definition at line 62 of file forwarder-general-module.cpp.

void nfd::tools::nfdc::ForwarderGeneralModule::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 98 of file forwarder-general-module.cpp.

void nfd::tools::nfdc::ForwarderGeneralModule::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 56 of file forwarder-general-module.cpp.