NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: NDN, CCN, CCNx, content centric networks
API Documentation
ndn::nfd::CommandOptions Class Reference

contains options for ControlCommand execution More...

#include <command-options.hpp>

Collaboration diagram for ndn::nfd::CommandOptions:

Public Member Functions

 CommandOptions ()
 constructs CommandOptions More...
 
const time::millisecondsgetTimeout () const
 
CommandOptionssetTimeout (const time::milliseconds &timeout)
 sets command timeout More...
 
const NamegetPrefix () const
 
CommandOptionssetPrefix (const Name &prefix)
 sets command prefix More...
 
const security::SigningInfogetSigningInfo () const
 
CommandOptionssetSigningInfo (const security::SigningInfo &signingInfo)
 sets signing parameters More...
 

Static Public Attributes

static const time::milliseconds DEFAULT_TIMEOUT
 gives the default command timeout: 10000ms More...
 
static const Name DEFAULT_PREFIX
 gives the default command prefix: ndn:/localhost/nfd More...
 

Detailed Description

contains options for ControlCommand execution

Note
This type is intentionally copyable

Definition at line 34 of file command-options.hpp.

Constructor & Destructor Documentation

◆ CommandOptions()

ndn::nfd::CommandOptions::CommandOptions ( )

constructs CommandOptions

Postcondition
getTimeout() == DEFAULT_TIMEOUT
getPrefix() == DEFAULT_PREFIX
getSigningInfo().getSignerType() == SIGNER_TYPE_NULL

Definition at line 30 of file command-options.cpp.

Member Function Documentation

◆ getTimeout()

const time::milliseconds& ndn::nfd::CommandOptions::getTimeout ( ) const
inline
Returns
command timeout

Definition at line 47 of file command-options.hpp.

References setTimeout(), and websocketpp::transport::error::timeout.

Referenced by ndn::nfd::Controller::~Controller().

◆ setTimeout()

CommandOptions & ndn::nfd::CommandOptions::setTimeout ( const time::milliseconds timeout)

sets command timeout

Parameters
timeoutthe new command timeout, must be positive
Exceptions
std::out_of_rangeif timeout is non-positive
Returns
self

Definition at line 37 of file command-options.cpp.

References NDN_THROW, and websocketpp::transport::error::timeout.

Referenced by nfd::rib::Service::get(), and getTimeout().

◆ getPrefix()

◆ setPrefix()

CommandOptions & ndn::nfd::CommandOptions::setPrefix ( const Name prefix)

sets command prefix

Returns
self

Definition at line 48 of file command-options.cpp.

Referenced by nfd::rib::Service::get(), and getPrefix().

◆ getSigningInfo()

const security::SigningInfo& ndn::nfd::CommandOptions::getSigningInfo ( ) const
inline
Returns
signing parameters

Definition at line 77 of file command-options.hpp.

References setSigningInfo().

Referenced by ndn::nfd::Controller::~Controller().

◆ setSigningInfo()

CommandOptions & ndn::nfd::CommandOptions::setSigningInfo ( const security::SigningInfo signingInfo)

Member Data Documentation

◆ DEFAULT_TIMEOUT

const time::milliseconds ndn::nfd::CommandOptions::DEFAULT_TIMEOUT
static

gives the default command timeout: 10000ms

Definition at line 91 of file command-options.hpp.

◆ DEFAULT_PREFIX

const Name ndn::nfd::CommandOptions::DEFAULT_PREFIX
static

gives the default command prefix: ndn:/localhost/nfd

Definition at line 95 of file command-options.hpp.


The documentation for this class was generated from the following files: