NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.0: NDN, CCN, CCNx, content centric networks
API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
nfd::NullFace Class Reference

a Face that has no underlying transport and drops every packet More...

#include <null-face.hpp>

Inheritance diagram for nfd::NullFace:
Collaboration diagram for nfd::NullFace:

Public Member Functions

 NullFace (const FaceUri &uri=FaceUri("null://"))
 
virtual void sendInterest (const Interest &interest)
 send an Interest More...
 
virtual void sendData (const Data &data)
 send a Data More...
 
virtual void close ()
 Close the face. More...
 
- Public Member Functions inherited from nfd::Face
 Face (const FaceUri &remoteUri, const FaceUri &localUri, bool isLocal=false)
 
virtual ~Face ()
 
FaceId getId () const
 
virtual void setDescription (const std::string &description)
 Set the description. More...
 
virtual const std::string & getDescription () const
 Get the description. More...
 
void setMetric (uint64_t metric)
 
uint64_t getMetric () const
 
bool isLocal () const
 Get whether face is connected to a local app. More...
 
virtual bool isMultiAccess () const
 Get whether packets sent this Face may reach multiple peers. More...
 
virtual bool isUp () const
 Get whether underlying communication is up. More...
 
bool isOnDemand () const
 Get whether face is created on demand or explicitly via FaceManagement protocol. More...
 
const FaceCountersgetCounters () const
 
const FaceUri & getRemoteUri () const
 
const FaceUri & getLocalUri () const
 
template<typename FaceTraits >
void copyStatusTo (FaceTraits &traits) const
 
virtual ndn::nfd::FaceStatus getFaceStatus () const
 

Additional Inherited Members

- Public Attributes inherited from nfd::Face
EventEmitter< Interest > onReceiveInterest
 fires when an Interest is received More...
 
EventEmitter< Data > onReceiveData
 fires when a Data is received More...
 
EventEmitter< Interest > onSendInterest
 fires when an Interest is sent out More...
 
EventEmitter< Data > onSendData
 fires when a Data is sent out More...
 
EventEmitter< std::string > onFail
 fires when face disconnects or fails to perform properly More...
 
- Protected Member Functions inherited from nfd::Face
bool decodeAndDispatchInput (const Block &element)
 
FaceCountersgetMutableCounters ()
 
void setOnDemand (bool isOnDemand)
 
void fail (const std::string &reason)
 fail the face and raise onFail event if it's UP; otherwise do nothing More...
 

Detailed Description

a Face that has no underlying transport and drops every packet

Definition at line 36 of file null-face.hpp.

Constructor & Destructor Documentation

nfd::NullFace::NullFace ( const FaceUri &  uri = FaceUri("null://"))
explicit

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

Member Function Documentation

void nfd::NullFace::close ( )
virtual

Close the face.

This terminates all communication on the face and cause onFail() method event to be invoked

Implements nfd::Face.

Definition at line 49 of file null-face.cpp.

References nfd::Face::fail().

void nfd::NullFace::sendData ( const Data &  data)
virtual

send a Data

Implements nfd::Face.

Definition at line 44 of file null-face.cpp.

void nfd::NullFace::sendInterest ( const Interest &  interest)
virtual

send an Interest

Implements nfd::Face.

Definition at line 39 of file null-face.cpp.


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