NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: NDN, CCN, CCNx, content centric networks
API Documentation
ndn::util::NotificationSubscriber< Notification > Class Template Reference

provides a subscriber of Notification Stream More...

#include <notification-subscriber.hpp>

Inheritance diagram for ndn::util::NotificationSubscriber< Notification >:
Collaboration diagram for ndn::util::NotificationSubscriber< Notification >:

Public Member Functions

 NotificationSubscriber (Face &face, const Name &prefix, time::milliseconds interestLifetime=1_min)
 construct a NotificationSubscriber More...
 
- Public Member Functions inherited from ndn::util::NotificationSubscriberBase
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

 WireDecodable< Notification >
 
signal::Signal< NotificationSubscriber, Notification > onNotification
 fires when a Notification is received More...
 
- Public Attributes inherited from ndn::util::NotificationSubscriberBase
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...
 

Additional Inherited Members

- Protected Member Functions inherited from ndn::util::NotificationSubscriberBase
 NotificationSubscriberBase (Face &face, const Name &prefix, time::milliseconds interestLifetime)
 construct a NotificationSubscriber More...
 

Detailed Description

template<typename Notification>
class ndn::util::NotificationSubscriber< Notification >

provides a subscriber of Notification Stream

See also
https://redmine.named-data.net/projects/nfd/wiki/Notification
Template Parameters
Notificationtype of Notification item, appears in payload of Data packets

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

Constructor & Destructor Documentation

◆ NotificationSubscriber()

template<typename Notification>
ndn::util::NotificationSubscriber< Notification >::NotificationSubscriber ( Face face,
const Name prefix,
time::milliseconds  interestLifetime = 1_min 
)
inline

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 161 of file notification-subscriber.hpp.

Member Data Documentation

◆ WireDecodable< Notification >

template<typename Notification>
ndn::util::NotificationSubscriber< Notification >::WireDecodable< Notification >

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

◆ onNotification

template<typename Notification>
signal::Signal<NotificationSubscriber, Notification> ndn::util::NotificationSubscriber< Notification >::onNotification

fires when a Notification is received

Note
Removing all handlers will cause the subscriber to stop.

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

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


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