22 #ifndef NDN_MANAGEMENT_NFD_CONTROLLER_HPP 23 #define NDN_MANAGEMENT_NFD_CONTROLLER_HPP 26 #include "../face.hpp" 27 #include "../security/key-chain.hpp" 60 template<
typename Command>
63 const CommandSucceedCallback& onSuccess,
64 const CommandFailCallback& onFailure,
67 shared_ptr<ControlCommand> command = make_shared<Command>();
68 this->startCommand(command, parameters, onSuccess, onFailure, options);
73 startCommand(
const shared_ptr<ControlCommand>& command,
75 const CommandSucceedCallback& onSuccess,
76 const CommandFailCallback& onFailure,
80 processCommandResponse(
const Data& data,
81 const shared_ptr<ControlCommand>& command,
82 const CommandSucceedCallback& onSuccess,
83 const CommandFailCallback& onFailure);
110 #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
The packet signing interface.
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
static const uint32_t ERROR_NACK
error code for network Nack