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

contains options for ControlCommand execution More...

#include <nfd-command-options.hpp>

Collaboration diagram for ndn::nfd::CommandOptions:

Public Types

enum  SigningParamsKind { SIGNING_PARAMS_DEFAULT, SIGNING_PARAMS_IDENTITY, SIGNING_PARAMS_CERTIFICATE }
 indicates the selection of signing parameters More...
 

Public Member Functions

 CommandOptions ()
 constructs CommandOptions More...
 
const time::milliseconds & getTimeout () 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...
 
 DEPRECATED (SigningParamsKind getSigningParamsKind() const)
 
 DEPRECATED (const Name &getSigningIdentity() const)
 
 DEPRECATED (const Name &getSigningCertificate() const)
 
 DEPRECATED (CommandOptions &setSigningDefault())
 chooses to use default identity and certificate More...
 
 DEPRECATED (CommandOptions &setSigningIdentity(const Name &identityName))
 chooses to use a specific identity and its default certificate More...
 
 DEPRECATED (CommandOptions &setSigningCertificate(const Name &certificateName))
 chooses to use a specific identity certificate More...
 
 DEPRECATED (CommandOptions &setSigningCertificate(const IdentityCertificate &certificate))
 chooses to use a specific identity certificate 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 39 of file nfd-command-options.hpp.

Member Enumeration Documentation

indicates the selection of signing parameters

Deprecated:
use getSigningInfo and setSigningInfo
Enumerator
SIGNING_PARAMS_DEFAULT 

picks the default signing identity and certificate

SIGNING_PARAMS_IDENTITY 

picks the default certificate of a specific identity Name

SIGNING_PARAMS_CERTIFICATE 

picks a specific identity certificate

Definition at line 98 of file nfd-command-options.hpp.

Constructor & Destructor Documentation

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

constructs CommandOptions

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

Definition at line 35 of file nfd-command-options.cpp.

Member Function Documentation

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

Definition at line 52 of file nfd-command-options.hpp.

References setTimeout().

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

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 42 of file nfd-command-options.cpp.

Referenced by getTimeout(), and nfd::rib::RemoteRegistrator::loadConfig().

const Name& ndn::nfd::CommandOptions::getPrefix ( ) const
inline
Returns
command prefix

Definition at line 68 of file nfd-command-options.hpp.

References setPrefix().

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

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

sets command prefix

Returns
self

Definition at line 53 of file nfd-command-options.cpp.

Referenced by getPrefix(), and nfd::rib::RemoteRegistrator::loadConfig().

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

Definition at line 82 of file nfd-command-options.hpp.

References setSigningInfo().

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

ndn::nfd::CommandOptions::DEPRECATED ( SigningParamsKind getSigningParamsKind()  const)
Deprecated:
use getSigningInfo and setSigningInfo
Returns
selection of signing parameters
ndn::nfd::CommandOptions::DEPRECATED ( const Name &getSigningIdentity()  const)
Deprecated:
use getSigningInfo and setSigningInfo
Returns
identity Name
Precondition
getSigningParamsKind() == SIGNING_PARAMS_IDENTITY
ndn::nfd::CommandOptions::DEPRECATED ( const Name &getSigningCertificate()  const)
Deprecated:
use getSigningInfo and setSigningInfo
Returns
certificate Name
Precondition
getSigningParamsKind() == SIGNING_PARAMS_CERTIFICATE
ndn::nfd::CommandOptions::DEPRECATED ( CommandOptions setSigningDefault())

chooses to use default identity and certificate

Deprecated:
use getSigningInfo and setSigningInfo
Postcondition
getSigningParamsKind() == SIGNING_PARAMS_DEFAULT
Returns
self
ndn::nfd::CommandOptions::DEPRECATED ( CommandOptions setSigningIdentityconst Name &identityName)

chooses to use a specific identity and its default certificate

Deprecated:
use getSigningInfo and setSigningInfo
Postcondition
getSigningParamsKind() == SIGNING_PARAMS_IDENTITY
getIdentityName() == identityName
Returns
self
ndn::nfd::CommandOptions::DEPRECATED ( CommandOptions setSigningCertificateconst Name &certificateName)

chooses to use a specific identity certificate

Deprecated:
use getSigningInfo and setSigningInfo
Parameters
certificateNameidentity certificate Name
Exceptions
std::invalid_argumentif certificateName is invalid
Postcondition
getSigningParamsKind() == SIGNING_PARAMS_CERTIFICATE
getSigningCertificate() == certificateName
Returns
self
ndn::nfd::CommandOptions::DEPRECATED ( CommandOptions setSigningCertificateconst IdentityCertificate &certificate)

chooses to use a specific identity certificate

Deprecated:
use getSigningInfo and setSigningInfo

This is equivalent to .setIdentityCertificate(certificate.getName())

Member Data Documentation

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

gives the default command timeout: 10000ms

Definition at line 177 of file nfd-command-options.hpp.

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

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

Definition at line 181 of file nfd-command-options.hpp.


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