nfd::tools::nfdc::ChannelModule Class Reference

provides access to NFD channel dataset More...

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

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

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 formatItemText (std::ostream &os, const ChannelStatus &item) const
 format a single status item as text More...
 
void formatItemXml (std::ostream &os, const ChannelStatus &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 channel dataset

See also
https://redmine.named-data.net/projects/nfd/wiki/FaceMgmt#Channel-Dataset

Definition at line 40 of file channel-module.hpp.

Member Function Documentation

◆ fetchStatus()

void nfd::tools::nfdc::ChannelModule::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 34 of file channel-module.cpp.

◆ formatItemText()

void nfd::tools::nfdc::ChannelModule::formatItemText ( std::ostream &  os,
const ChannelStatus &  item 
) const

format a single status item as text

Parameters
osoutput stream
itemstatus item

Definition at line 75 of file channel-module.cpp.

◆ formatItemXml()

void nfd::tools::nfdc::ChannelModule::formatItemXml ( std::ostream &  os,
const ChannelStatus &  item 
) const

format a single status item as XML

Parameters
osoutput stream
itemstatus item

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

◆ formatStatusText()

void nfd::tools::nfdc::ChannelModule::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 66 of file channel-module.cpp.

◆ formatStatusXml()

void nfd::tools::nfdc::ChannelModule::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 channel-module.cpp.