ndn-cxx: NDN C++ Library 0.9.0-33-g832ea91d
Loading...
Searching...
No Matches
ndn::nfd::Controller Class Reference

NFD Management protocol client. More...

#include <ndn-cxx/mgmt/nfd/controller.hpp>

+ Inheritance diagram for ndn::nfd::Controller:
+ Collaboration diagram for ndn::nfd::Controller:

Public Types

enum  : uint32_t {
  ERROR_LBOUND = 400 ,
  ERROR_SERVER = 500 ,
  ERROR_TIMEOUT = 10060 ,
  ERROR_NACK = 10800 ,
  ERROR_VALIDATION = 10021
}
 

Public Member Functions

 Controller (Face &face, KeyChain &keyChain, security::Validator &validator=security::getAcceptAllValidator())
 Construct a Controller that uses face as transport and keyChain to sign commands.
 
 ~Controller ()
 
template<typename Dataset >
std::enable_if_t< std::is_default_constructible_v< Dataset > > fetch (const DatasetSuccessCallback< Dataset > &onSuccess, const DatasetFailureCallback &onFailure, const CommandOptions &options={})
 Start dataset fetching.
 
template<typename Dataset , typename ParamType >
void fetch (ParamType &&param, const DatasetSuccessCallback< Dataset > &onSuccess, const DatasetFailureCallback &onFailure, const CommandOptions &options={})
 Start dataset fetching.
 
template<typename Command , typename CommandParameters = typename Command::RequestParameters>
void start (const CommandParameters &parameters, CommandSuccessCallback onSuccess, const CommandFailureCallback &onFailure, const CommandOptions &options={})
 Start command execution.
 

Protected Attributes

Facem_face
 
std::set< shared_ptr< SegmentFetcher > > m_fetchers
 
KeyChainm_keyChain
 
security::InterestSigner m_signer
 
security::Validatorm_validator
 

Detailed Description

NFD Management protocol client.

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

Definition at line 78 of file controller.hpp.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum : uint32_t
Enumerator
ERROR_LBOUND 

Inclusive lower bound of error codes.

ERROR_SERVER 

Error code for server error.

ERROR_TIMEOUT 

Error code for timeout.

ERROR_NACK 

Error code for network Nack.

ERROR_VALIDATION 

Error code for response validation failure.

Definition at line 171 of file controller.hpp.

Constructor & Destructor Documentation

◆ Controller()

ndn::nfd::Controller::Controller ( Face face,
KeyChain keyChain,
security::Validator validator = security::getAcceptAllValidator() 
)

Construct a Controller that uses face as transport and keyChain to sign commands.

Definition at line 30 of file controller.cpp.

◆ ~Controller()

ndn::nfd::Controller::~Controller ( )

Definition at line 38 of file controller.cpp.

Member Function Documentation

◆ fetch() [1/2]

template<typename Dataset >
std::enable_if_t< std::is_default_constructible_v< Dataset > > ndn::nfd::Controller::fetch ( const DatasetSuccessCallback< Dataset > &  onSuccess,
const DatasetFailureCallback onFailure,
const CommandOptions options = {} 
)
inline

Start dataset fetching.

Definition at line 112 of file controller.hpp.

◆ fetch() [2/2]

template<typename Dataset , typename ParamType >
void ndn::nfd::Controller::fetch ( ParamType &&  param,
const DatasetSuccessCallback< Dataset > &  onSuccess,
const DatasetFailureCallback onFailure,
const CommandOptions options = {} 
)
inline

Start dataset fetching.

Definition at line 124 of file controller.hpp.

◆ start()

template<typename Command , typename CommandParameters = typename Command::RequestParameters>
void ndn::nfd::Controller::start ( const CommandParameters &  parameters,
CommandSuccessCallback  onSuccess,
const CommandFailureCallback onFailure,
const CommandOptions options = {} 
)
inline

Start command execution.

Definition at line 95 of file controller.hpp.

Member Data Documentation

◆ m_face

Face& ndn::nfd::Controller::m_face
protected

Definition at line 185 of file controller.hpp.

◆ m_fetchers

std::set<shared_ptr<SegmentFetcher> > ndn::nfd::Controller::m_fetchers
protected

Definition at line 191 of file controller.hpp.

◆ m_keyChain

KeyChain& ndn::nfd::Controller::m_keyChain
protected

Definition at line 186 of file controller.hpp.

◆ m_signer

security::InterestSigner ndn::nfd::Controller::m_signer
protected

Definition at line 188 of file controller.hpp.

◆ m_validator

security::Validator& ndn::nfd::Controller::m_validator
protected

Definition at line 187 of file controller.hpp.