nfd::tools::nfdc::StatusReport Class Reference

Collects and prints NFD status report. More...

#include <tools/nfdc/status-report.hpp>

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

Public Member Functions

uint32_t collect (ndn::Face &face, ndn::KeyChain &keyChain, ndn::security::Validator &validator, const CommandOptions &options)
 Collect status via chosen sections. More...
 
void formatText (std::ostream &os) const
 Print a text report. More...
 
void formatXml (std::ostream &os) const
 Print an XML report. More...
 

Public Attributes

std::vector< unique_ptr< Module > > sections
 Modules through which status is collected. More...
 

Detailed Description

Collects and prints NFD status report.

Definition at line 49 of file status-report.hpp.

Member Function Documentation

◆ collect()

uint32_t nfd::tools::nfdc::StatusReport::collect ( ndn::Face &  face,
ndn::KeyChain &  keyChain,
ndn::security::Validator &  validator,
const CommandOptions &  options 
)

Collect status via chosen sections.

This function is blocking. It has exclusive use of face.

Returns
if status has been fetched successfully, 0; otherwise, error code from any failed section, plus 1000000 * section index

Definition at line 44 of file status-report.cpp.

◆ formatText()

void nfd::tools::nfdc::StatusReport::formatText ( std::ostream &  os) const

Print a text report.

Parameters
osoutput stream

Definition at line 82 of file status-report.cpp.

◆ formatXml()

void nfd::tools::nfdc::StatusReport::formatXml ( std::ostream &  os) const

Print an XML report.

Parameters
osoutput stream

Definition at line 72 of file status-report.cpp.

Member Data Documentation

◆ sections

std::vector<unique_ptr<Module> > nfd::tools::nfdc::StatusReport::sections

Modules through which status is collected.

Definition at line 90 of file status-report.hpp.