ndn::nfd::CommandOptions Class Reference

Contains options for ControlCommand execution. More...

#include <ndn-cxx/mgmt/nfd/command-options.hpp>

+ Collaboration diagram for ndn::nfd::CommandOptions:

Public Member Functions

 CommandOptions ()
 Constructs CommandOptions. More...
 
const NamegetPrefix () const
 Returns the command prefix. More...
 
const security::SigningInfogetSigningInfo () const
 Returns the signing parameters. More...
 
time::milliseconds getTimeout () const
 Returns the command timeout. More...
 
CommandOptionssetPrefix (const Name &prefix)
 Sets the command prefix. More...
 
CommandOptionssetSigningInfo (const security::SigningInfo &signingInfo)
 Sets the signing parameters. More...
 
CommandOptionssetTimeout (const time::milliseconds &timeout)
 Sets the command timeout. More...
 

Static Public Attributes

static const Name DEFAULT_PREFIX
 The default command prefix: /localhost/nfd. More...
 
static const time::milliseconds DEFAULT_TIMEOUT
 The default command timeout: 10 seconds. 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

◆ getPrefix()

const Name& ndn::nfd::CommandOptions::getPrefix ( ) const
inline

Returns the command prefix.

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

◆ getSigningInfo()

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

Returns the signing parameters.

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

◆ getTimeout()

time::milliseconds ndn::nfd::CommandOptions::getTimeout ( ) const
inline

Returns the command timeout.

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

◆ setPrefix()

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

Sets the command prefix.

Returns
self

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

◆ setSigningInfo()

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

Sets the signing parameters.

Returns
self

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

◆ setTimeout()

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

Sets the 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.

Member Data Documentation

◆ DEFAULT_PREFIX

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

The default command prefix: /localhost/nfd.

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

◆ DEFAULT_TIMEOUT

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

The default command timeout: 10 seconds.

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