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 ()=default
 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 (Name prefix)
 Sets the command prefix. More...
 
CommandOptionssetSigningInfo (security::SigningInfo signingInfo)
 Sets the signing parameters. More...
 
CommandOptionssetTimeout (time::milliseconds timeout)
 Sets the command timeout. More...
 

Static Public Attributes

static const Name DEFAULT_PREFIX {"/localhost/nfd"}
 The default command prefix: /localhost/nfd. More...
 
static constexpr time::milliseconds DEFAULT_TIMEOUT = 10_s
 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 ( )
default

Constructs CommandOptions.

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

Member Function Documentation

◆ getPrefix()

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

Returns the command prefix.

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

◆ getSigningInfo()

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

Returns the signing parameters.

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

◆ getTimeout()

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

Returns the command timeout.

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

◆ setPrefix()

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

Sets the command prefix.

Returns
self

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

◆ setSigningInfo()

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

Sets the signing parameters.

Returns
self

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

◆ setTimeout()

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

Sets the command timeout.

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

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

Member Data Documentation

◆ DEFAULT_PREFIX

const Name ndn::nfd::CommandOptions::DEFAULT_PREFIX {"/localhost/nfd"}
inlinestatic

The default command prefix: /localhost/nfd.

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

◆ DEFAULT_TIMEOUT

constexpr time::milliseconds ndn::nfd::CommandOptions::DEFAULT_TIMEOUT = 10_s
staticconstexpr

The default command timeout: 10 seconds.

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