All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ndn::nrd::Controller Class Reference

#include <nrd-controller.hpp>

Inheritance diagram for ndn::nrd::Controller:
[legend]
Collaboration diagram for ndn::nrd::Controller:
[legend]

Public Types

typedef function< void(const
PrefixRegOptions &)> 
CommandSucceedCallback
 
typedef function< void(uint32_t,
const std::string &)> 
CommandFailCallback
 a callback on command failure More...
 
typedef function< void()> SuccessCallback
 
typedef function< void(const
std::string &)> 
FailCallback
 

Public Member Functions

 Controller (Face &face)
 
virtual void selfRegisterPrefix (const Name &prefixToRegister, const SuccessCallback &onSuccess, const FailCallback &onFail)
 
virtual void selfDeregisterPrefix (const Name &prefixToRegister, const SuccessCallback &onSuccess, const FailCallback &onFail)
 
void registerPrefix (const PrefixRegOptions &options, const CommandSucceedCallback &onSuccess, const FailCallback &onFail)
 
void unregisterPrefix (const PrefixRegOptions &options, const CommandSucceedCallback &onSuccess, const FailCallback &onFail)
 
void advertisePrefix (const PrefixRegOptions &options, const CommandSucceedCallback &onSuccess, const FailCallback &onFail)
 
void withdrawPrefix (const PrefixRegOptions &options, const CommandSucceedCallback &onSuccess, const FailCallback &onFail)
 
template<typename Command >
void start (const ControlParameters &parameters, const CommandSucceedCallback &onSuccess, const CommandFailCallback &onFailure, time::milliseconds timeout=getDefaultCommandTimeout())
 start command execution More...
 

Static Public Member Functions

static time::milliseconds getDefaultCommandTimeout ()
 

Protected Member Functions

void startCommand (const std::string &command, const PrefixRegOptions &options, const CommandSucceedCallback &onSuccess, const FailCallback &onFailure)
 

Protected Attributes

Facem_face
 
CommandInterestGenerator m_commandInterestGenerator
 

Detailed Description

Definition at line 18 of file nrd-controller.hpp.

Member Typedef Documentation

typedef function<void(uint32_t,const std::string&)> ndn::nfd::Controller::CommandFailCallback
inherited

a callback on command failure

Definition at line 28 of file nfd-controller.hpp.

Deprecated:

Definition at line 22 of file nrd-controller.hpp.

typedef function<void(const std::string&)> ndn::Controller::FailCallback
inherited

Definition at line 24 of file controller.hpp.

typedef function<void()> ndn::Controller::SuccessCallback
inherited

Definition at line 23 of file controller.hpp.

Constructor & Destructor Documentation

ndn::nrd::Controller::Controller ( Face face)
explicit

Definition at line 18 of file nrd-controller.cpp.

Member Function Documentation

void ndn::nrd::Controller::advertisePrefix ( const PrefixRegOptions options,
const CommandSucceedCallback onSuccess,
const FailCallback onFail 
)
Deprecated:

Definition at line 66 of file nrd-controller.cpp.

static time::milliseconds ndn::nfd::Controller::getDefaultCommandTimeout ( )
inlinestaticinherited

Definition at line 62 of file nfd-controller.hpp.

void ndn::nrd::Controller::registerPrefix ( const PrefixRegOptions options,
const CommandSucceedCallback onSuccess,
const FailCallback onFail 
)
Deprecated:
.start<RibRegisterCommand>

Definition at line 50 of file nrd-controller.cpp.

void ndn::nrd::Controller::selfDeregisterPrefix ( const Name prefixToRegister,
const SuccessCallback onSuccess,
const FailCallback onFail 
)
virtual

Reimplemented from ndn::nfd::Controller.

Definition at line 37 of file nrd-controller.cpp.

void ndn::nrd::Controller::selfRegisterPrefix ( const Name prefixToRegister,
const SuccessCallback onSuccess,
const FailCallback onFail 
)
virtual

Reimplemented from ndn::nfd::Controller.

Definition at line 24 of file nrd-controller.cpp.

template<typename Command >
void ndn::nfd::Controller::start ( const ControlParameters parameters,
const CommandSucceedCallback onSuccess,
const CommandFailCallback onFailure,
time::milliseconds  timeout = getDefaultCommandTimeout() 
)
inherited

start command execution

Definition at line 75 of file nfd-controller.hpp.

void ndn::nrd::Controller::startCommand ( const std::string &  command,
const PrefixRegOptions options,
const CommandSucceedCallback onSuccess,
const FailCallback onFailure 
)
protected
Deprecated:

Definition at line 82 of file nrd-controller.cpp.

void ndn::nrd::Controller::unregisterPrefix ( const PrefixRegOptions options,
const CommandSucceedCallback onSuccess,
const FailCallback onFail 
)
Deprecated:
.start<RibUnregisterCommand>

Definition at line 58 of file nrd-controller.cpp.

void ndn::nrd::Controller::withdrawPrefix ( const PrefixRegOptions options,
const CommandSucceedCallback onSuccess,
const FailCallback onFail 
)
Deprecated:

Definition at line 74 of file nrd-controller.cpp.

Field Documentation

CommandInterestGenerator ndn::nfd::Controller::m_commandInterestGenerator
protectedinherited

Definition at line 69 of file nfd-controller.hpp.

Face& ndn::nfd::Controller::m_face
protectedinherited

Definition at line 68 of file nfd-controller.hpp.