ndn::nfd::FaceMonitor Class Reference

A subscriber for Face status change notification stream. More...

#include <ndn-cxx/mgmt/nfd/face-monitor.hpp>

+ Inheritance diagram for ndn::nfd::FaceMonitor:
+ Collaboration diagram for ndn::nfd::FaceMonitor:

Public Member Functions

 FaceMonitor (Face &face)
 
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, DataonDecodeError
 Fires when a Data packet in the Notification Stream cannot be decoded as Notification. More...
 
signal::Signal< NotificationSubscriberBase, lp::NackonNack
 Fires when a Nack is received. More...
 
signal::Signal< NotificationSubscriber, FaceEventNotificationonNotification
 Fires when a Notification is received. More...
 
signal::Signal< NotificationSubscriberBaseonTimeout
 Fires when no Notification is received within getInterestLifetime() period. More...
 

Detailed Description

A subscriber for Face status change notification stream.

See also
https://redmine.named-data.net/projects/nfd/wiki/FaceMgmt#Face-Status-Change-Notification

Definition at line 40 of file face-monitor.hpp.

Constructor & Destructor Documentation

◆ FaceMonitor()

ndn::nfd::FaceMonitor::FaceMonitor ( Face face)
explicit

Definition at line 33 of file face-monitor.cpp.

Member Function Documentation

◆ getInterestLifetime()

time::milliseconds ndn::util::NotificationSubscriberBase::getInterestLifetime ( ) const
inlineinherited
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
inlineinherited

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

◆ start()

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

Start or resume receiving notifications.

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

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

◆ stop()

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

Stop receiving notifications.

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

Member Data Documentation

◆ onDecodeError

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

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

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

◆ onNack

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

Fires when a Nack is received.

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

◆ 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.

◆ onTimeout

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

Fires when no Notification is received within getInterestLifetime() period.

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