22 #ifndef NDN_MANAGEMENT_NFD_CONTROLLER_HPP 23 #define NDN_MANAGEMENT_NFD_CONTROLLER_HPP 26 #include "../face.hpp" 27 #include "../security/key-chain.hpp" 59 template<
typename Command>
62 const CommandSucceedCallback& onSuccess,
63 const CommandFailCallback& onFailure,
66 shared_ptr<ControlCommand> command = make_shared<Command>();
67 this->startCommand(command, parameters, onSuccess, onFailure, options);
72 startCommand(
const shared_ptr<ControlCommand>& command,
74 const CommandSucceedCallback& onSuccess,
75 const CommandFailCallback& onFailure,
79 processCommandResponse(
const Data& data,
80 const shared_ptr<ControlCommand>& command,
81 const CommandSucceedCallback& onSuccess,
82 const CommandFailCallback& onFailure);
106 #endif // NDN_MANAGEMENT_NFD_CONTROLLER_HPP void start(const ControlParameters ¶meters, const CommandSucceedCallback &onSuccess, const CommandFailCallback &onFailure, const CommandOptions &options=CommandOptions())
start command execution
Copyright (c) 2011-2015 Regents of the University of California.
represents parameters in a ControlCommand request or response
static const uint32_t ERROR_TIMEOUT
error code for timeout
function< void(const ControlParameters &)> CommandSucceedCallback
a callback on command success
static const uint32_t ERROR_LBOUND
inclusive lower bound of error codes
contains options for ControlCommand execution
Copyright (c) 2011-2015 Regents of the University of California.
Abstraction to communicate with local or remote NDN forwarder.
NFD Management protocol - ControlCommand client.
function< void(uint32_t, const std::string &)> CommandFailCallback
a callback on command failure
Controller(Face &face, KeyChain &keyChain)
construct a Controller that uses face for transport, and uses the passed KeyChain to sign commands ...
static const uint32_t ERROR_SERVER
error code for server error