NFD Management protocol - ControlCommand client. More...
#include <nfd-controller.hpp>
Public Types | |
typedef function< void(const ControlParameters &)> | CommandSucceedCallback |
a callback on command success More... | |
typedef function< void(uint32_t, const std::string &)> | CommandFailCallback |
a callback on command failure More... | |
Public Member Functions | |
Controller (Face &face, KeyChain &keyChain) | |
construct a Controller that uses face for transport, and uses the passed KeyChain to sign commands More... | |
template<typename Command > | |
void | start (const ControlParameters ¶meters, const CommandSucceedCallback &onSuccess, const CommandFailCallback &onFailure, const CommandOptions &options=CommandOptions()) |
start command execution More... | |
Static Public Attributes | |
static const uint32_t | ERROR_TIMEOUT = 10060 |
error code for timeout More... | |
static const uint32_t | ERROR_NACK = 10800 |
error code for network Nack More... | |
static const uint32_t | ERROR_SERVER = 500 |
error code for server error More... | |
static const uint32_t | ERROR_LBOUND = 400 |
inclusive lower bound of error codes More... | |
Protected Attributes | |
Face & | m_face |
KeyChain & | m_keyChain |
NFD Management protocol - ControlCommand client.
Definition at line 42 of file nfd-controller.hpp.
typedef function<void(const ControlParameters&)> ndn::nfd::Controller::CommandSucceedCallback |
a callback on command success
Definition at line 47 of file nfd-controller.hpp.
typedef function<void(uint32_t,const std::string&)> ndn::nfd::Controller::CommandFailCallback |
a callback on command failure
Definition at line 51 of file nfd-controller.hpp.
construct a Controller that uses face for transport, and uses the passed KeyChain to sign commands
Definition at line 33 of file nfd-controller.cpp.
References ndn::Block::blockFromValue(), ERROR_LBOUND, ERROR_NACK, ERROR_SERVER, ERROR_TIMEOUT, ndn::Face::expressInterest(), ndn::mgmt::ControlResponse::getBody(), ndn::mgmt::ControlResponse::getCode(), ndn::Data::getContent(), ndn::nfd::CommandOptions::getPrefix(), ndn::nfd::CommandOptions::getSigningInfo(), ndn::mgmt::ControlResponse::getText(), ndn::nfd::CommandOptions::getTimeout(), m_face, m_keyChain, ndn::Interest::setInterestLifetime(), ndn::security::KeyChain::sign(), ndn::mgmt::ControlResponse::wireDecode(), and ndn::nfd::ControlParameters::wireDecode().
|
inline |
start command execution
Definition at line 62 of file nfd-controller.hpp.
Referenced by nfd::rib::FibUpdater::computeAndSendFibUpdates(), nfd::rib::AutoPrefixPropagator::disable(), nfd::rib::RibManager::enableLocalControlHeader(), and nfd::rib::RibManager::~RibManager().
|
static |
error code for timeout
Definition at line 88 of file nfd-controller.hpp.
Referenced by nfd::rib::FibUpdater::computeAndSendFibUpdates(), and Controller().
|
static |
error code for network Nack
Definition at line 92 of file nfd-controller.hpp.
Referenced by Controller().
|
static |
error code for server error
Definition at line 96 of file nfd-controller.hpp.
Referenced by Controller().
|
static |
inclusive lower bound of error codes
Definition at line 100 of file nfd-controller.hpp.
Referenced by Controller().
|
protected |
Definition at line 103 of file nfd-controller.hpp.
Referenced by Controller().
|
protected |
Definition at line 104 of file nfd-controller.hpp.
Referenced by Controller().