NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: NDN, CCN, CCNx, content centric networks
API Documentation
ndn::util::NotificationSubscriberBase Class Referenceabstract

#include <notification-subscriber.hpp>

Inheritance diagram for ndn::util::NotificationSubscriberBase:
Collaboration diagram for ndn::util::NotificationSubscriberBase:

Public Member Functions

virtual ~NotificationSubscriberBase ()
 
time::milliseconds getInterestLifetime () const
 
bool isRunning () const
 
void start ()
 start or resume receiving notifications More...
 
void stop ()
 stop receiving notifications More...
 

Public Attributes

signal::Signal< NotificationSubscriberBase, lp::NackonNack
 fires when a NACK is received More...
 
signal::Signal< NotificationSubscriberBaseonTimeout
 fires when no Notification is received within .getInterestLifetime period More...
 
signal::Signal< NotificationSubscriberBase, DataonDecodeError
 fires when a Data packet in the Notification Stream cannot be decoded as Notification More...
 

Protected Member Functions

 NotificationSubscriberBase (Face &face, const Name &prefix, time::milliseconds interestLifetime)
 construct a NotificationSubscriber More...
 

Detailed Description

Definition at line 40 of file notification-subscriber.hpp.

Constructor & Destructor Documentation

◆ ~NotificationSubscriberBase()

ndn::util::NotificationSubscriberBase::~NotificationSubscriberBase ( )
virtualdefault

◆ NotificationSubscriberBase()

ndn::util::NotificationSubscriberBase::NotificationSubscriberBase ( Face face,
const Name prefix,
time::milliseconds  interestLifetime 
)
protected

construct a NotificationSubscriber

Note
The subscriber is not started after construction. User should add one or more handlers to onNotification, and invoke .start().

Definition at line 36 of file notification-subscriber.cpp.

Member Function Documentation

◆ getInterestLifetime()

time::milliseconds ndn::util::NotificationSubscriberBase::getInterestLifetime ( ) const
inline
Returns
InterestLifetime of Interests to retrieve notifications

This must be greater than FreshnessPeriod of Notification Data packets, to ensure correct operation of this subscriber implementation.

Definition at line 52 of file notification-subscriber.hpp.

◆ isRunning()

bool ndn::util::NotificationSubscriberBase::isRunning ( ) const
inline

Definition at line 58 of file notification-subscriber.hpp.

◆ start()

void ndn::util::NotificationSubscriberBase::start ( )

start or resume receiving notifications

Note
onNotification must have at least one listener, otherwise this operation has no effect.

Definition at line 53 of file notification-subscriber.cpp.

Referenced by nfd::rib::RibManager::registerWithNfd().

◆ stop()

void ndn::util::NotificationSubscriberBase::stop ( )

stop receiving notifications

Definition at line 63 of file notification-subscriber.cpp.

References ndn::Face::removePendingInterest().

Member Data Documentation

◆ onNack

signal::Signal<NotificationSubscriberBase, lp::Nack> ndn::util::NotificationSubscriberBase::onNack

fires when a NACK is received

Definition at line 123 of file notification-subscriber.hpp.

◆ onTimeout

signal::Signal<NotificationSubscriberBase> ndn::util::NotificationSubscriberBase::onTimeout

fires when no Notification is received within .getInterestLifetime period

Definition at line 127 of file notification-subscriber.hpp.

◆ onDecodeError

signal::Signal<NotificationSubscriberBase, Data> ndn::util::NotificationSubscriberBase::onDecodeError

fires when a Data packet in the Notification Stream cannot be decoded as Notification

Definition at line 131 of file notification-subscriber.hpp.


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