ndn::tools::autoconfig::NdnFchDiscovery Class Reference

Discovery NDN hub using NDN-FCH protocol. More...

#include <tools/ndn-autoconfig/ndn-fch-discovery.hpp>

+ Inheritance diagram for ndn::tools::autoconfig::NdnFchDiscovery:
+ Collaboration diagram for ndn::tools::autoconfig::NdnFchDiscovery:

Public Member Functions

 NdnFchDiscovery (const std::string &url)
 Create stage to discover NDN hub using NDN-FCH protocol. More...
const std::string & getName () const override
 get stage name More...
void start ()
 start running this stage More...

Public Attributes

util::Signal< Stage, std::string > onFailure
 signal when discovery fails More...
util::Signal< Stage, FaceUri > onSuccess
 signal when a HUB FaceUri is found More...

Protected Member Functions

void fail (const std::string &msg)
void provideHubFaceUri (const std::string &s)
 parse HUB FaceUri from string and declare success More...
void succeed (const FaceUri &hubFaceUri)

Detailed Description

Discovery NDN hub using NDN-FCH protocol.

See also

Definition at line 40 of file ndn-fch-discovery.hpp.

Constructor & Destructor Documentation

◆ NdnFchDiscovery()

ndn::tools::autoconfig::NdnFchDiscovery::NdnFchDiscovery ( const std::string &  url)

Create stage to discover NDN hub using NDN-FCH protocol.

Definition at line 139 of file ndn-fch-discovery.cpp.

Member Function Documentation

◆ fail()

void ndn::tools::autoconfig::Stage::fail ( const std::string &  msg)

Definition at line 65 of file stage.cpp.

◆ getName()

const std::string& ndn::tools::autoconfig::NdnFchDiscovery::getName ( ) const

get stage name

stage name as a phrase, typically starting with lower case

Implements ndn::tools::autoconfig::Stage.

Definition at line 50 of file ndn-fch-discovery.hpp.

◆ provideHubFaceUri()

void ndn::tools::autoconfig::Stage::provideHubFaceUri ( const std::string &  s)

parse HUB FaceUri from string and declare success

Definition at line 45 of file stage.cpp.

◆ start()

void ndn::tools::autoconfig::Stage::start ( )

start running this stage

Errorstage is already running

Definition at line 33 of file stage.cpp.

◆ succeed()

void ndn::tools::autoconfig::Stage::succeed ( const FaceUri &  hubFaceUri)

Definition at line 57 of file stage.cpp.

Member Data Documentation

◆ onFailure

util::Signal<Stage, std::string> ndn::tools::autoconfig::Stage::onFailure

signal when discovery fails

Argument is error message.

Definition at line 96 of file stage.hpp.

◆ onSuccess

util::Signal<Stage, FaceUri> ndn::tools::autoconfig::Stage::onSuccess

signal when a HUB FaceUri is found

Argument is HUB FaceUri, may not be canonical.

Definition at line 90 of file stage.hpp.