Loading...
Searching...
No Matches
nlsr::update::CommandProcessor Class Referenceabstract

#include <command-processor.hpp>

+ Inheritance diagram for nlsr::update::CommandProcessor:
+ Collaboration diagram for nlsr::update::CommandProcessor:

Classes

class  Error
 

Public Member Functions

 CommandProcessor (ndn::mgmt::Dispatcher &m_dispatcher, NamePrefixList &m_namePrefixList, Lsdb &lsdb)
 
virtual ~CommandProcessor ()=0
 
void advertiseAndInsertPrefix (const ndn::mgmt::ControlParametersBase &parameters, const ndn::mgmt::CommandContinuation &done)
 Add desired name prefix to the advertised name prefix list or insert a prefix into the FIB if parameters is valid.
 
virtual std::tuple< bool, std::string > afterAdvertise (const ndn::Name &prefix, uint64_t cost)
 Processing after advertise command delegated to subclass. This is always treated as successful if not implemented.
 
virtual std::tuple< bool, std::string > afterWithdraw (const ndn::Name &prefix)
 Processing after withdraw command delegated to subclass. This is always treated as successful if not implemented.
 
void withdrawAndRemovePrefix (const ndn::mgmt::ControlParametersBase &parameters, const ndn::mgmt::CommandContinuation &done)
 Remove desired name prefix from the advertised name prefix list or remove a prefix from the FIB if parameters is valid.
 

Protected Attributes

ndn::mgmt::Dispatcher & m_dispatcher
 
Lsdbm_lsdb
 
NamePrefixListm_namePrefixList
 

Detailed Description

Definition at line 38 of file command-processor.hpp.

Constructor & Destructor Documentation

◆ CommandProcessor()

nlsr::update::CommandProcessor::CommandProcessor ( ndn::mgmt::Dispatcher &  m_dispatcher,
NamePrefixList m_namePrefixList,
Lsdb lsdb 
)

Definition at line 31 of file command-processor.cpp.

◆ ~CommandProcessor()

nlsr::update::CommandProcessor::~CommandProcessor ( )
pure virtualdefault

Member Function Documentation

◆ advertiseAndInsertPrefix()

void nlsr::update::CommandProcessor::advertiseAndInsertPrefix ( const ndn::mgmt::ControlParametersBase &  parameters,
const ndn::mgmt::CommandContinuation &  done 
)

Add desired name prefix to the advertised name prefix list or insert a prefix into the FIB if parameters is valid.

Definition at line 43 of file command-processor.cpp.

◆ afterAdvertise()

virtual std::tuple< bool, std::string > nlsr::update::CommandProcessor::afterAdvertise ( const ndn::Name &  prefix,
uint64_t  cost 
)
inlinevirtual

Processing after advertise command delegated to subclass. This is always treated as successful if not implemented.

Returns
tuple {bool indicating success/failure, message string}.

Reimplemented in nlsr::update::PrefixUpdateProcessor.

Definition at line 73 of file command-processor.hpp.

◆ afterWithdraw()

virtual std::tuple< bool, std::string > nlsr::update::CommandProcessor::afterWithdraw ( const ndn::Name &  prefix)
inlinevirtual

Processing after withdraw command delegated to subclass. This is always treated as successful if not implemented.

Returns
tuple {bool indicating success/failure, message string}.

Reimplemented in nlsr::update::PrefixUpdateProcessor.

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

◆ withdrawAndRemovePrefix()

void nlsr::update::CommandProcessor::withdrawAndRemovePrefix ( const ndn::mgmt::ControlParametersBase &  parameters,
const ndn::mgmt::CommandContinuation &  done 
)

Remove desired name prefix from the advertised name prefix list or remove a prefix from the FIB if parameters is valid.

Definition at line 89 of file command-processor.cpp.

Member Data Documentation

◆ m_dispatcher

ndn::mgmt::Dispatcher& nlsr::update::CommandProcessor::m_dispatcher
protected

Definition at line 89 of file command-processor.hpp.

◆ m_lsdb

Lsdb& nlsr::update::CommandProcessor::m_lsdb
protected

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

◆ m_namePrefixList

NamePrefixList& nlsr::update::CommandProcessor::m_namePrefixList
protected

Definition at line 90 of file command-processor.hpp.