NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.0: NDN, CCN, CCNx, content centric networks
API Documentation
ns3::ndn::AppFace Class Reference

Implementation of application Ndn face. More...

#include <ndn-app-face.hpp>

Inheritance diagram for ns3::ndn::AppFace:
Collaboration diagram for ns3::ndn::AppFace:

Public Member Functions

 AppFace (Ptr< App > app)
 Default constructor. More...
 
virtual ~AppFace ()
 
virtual void sendInterest (const Interest &interest)
 Send Interest towards application. More...
 
virtual void sendData (const Data &data)
 Send Data towards application. More...
 
void onReceiveInterest (const Interest &interest)
 Send Interest towards NFD. More...
 
void onReceiveData (const Data &data)
 Send Data towards NFD. More...
 
virtual void close ()
 Close the face. More...
 
- Public Member Functions inherited from nfd::LocalFace
 LocalFace (const FaceUri &remoteUri, const FaceUri &localUri)
 
bool isLocalControlHeaderEnabled () const
 get whether any LocalControlHeader feature is enabled More...
 
bool isLocalControlHeaderEnabled (LocalControlFeature feature) const
 get whether a specific LocalControlHeader feature is enabled More...
 
void setLocalControlHeaderFeature (LocalControlFeature feature, bool enabled=true)
 enable or disable a LocalControlHeader feature More...
 
- Public Member Functions inherited from nfd::Face
 Face (const FaceUri &remoteUri, const FaceUri &localUri, bool isLocal=false, bool isMultiAccess=false)
 
virtual ~Face ()
 
virtual void sendInterest (const Interest &interest)=0
 send an Interest More...
 
virtual void sendData (const Data &data)=0
 send a Data More...
 
FaceId getId () const
 
const std::string & getDescription () const
 Get the description. More...
 
void setDescription (const std::string &description)
 Set the face description. More...
 
void setMetric (uint64_t metric)
 
uint64_t getMetric () const
 
bool isLocal () const
 Get whether face is connected to a local app. More...
 
ndn::nfd::FacePersistency getPersistency () const
 Get the persistency setting. More...
 
bool isMultiAccess () const
 Get whether packets sent by this face may reach multiple peers. More...
 
virtual bool isUp () const
 Get whether underlying communication is up. More...
 
const FaceCountersgetCounters () const
 
const FaceUrigetRemoteUri () const
 
const FaceUrigetLocalUri () const
 
template<typename FaceTraits >
void copyStatusTo (FaceTraits &traits) const
 
virtual ndn::nfd::FaceStatus getFaceStatus () const
 

Additional Inherited Members

- Public Attributes inherited from nfd::Face
signal::Signal< Face, InterestonReceiveInterest
 fires when an Interest is received More...
 
signal::Signal< Face, DataonReceiveData
 fires when a Data is received More...
 
signal::Signal< Face, InterestonSendInterest
 fires when an Interest is sent out More...
 
signal::Signal< Face, DataonSendData
 fires when a Data is sent out More...
 
signal::Signal< Face, std::string > onFail
 fires when face disconnects or fails to perform properly More...
 
- Static Public Attributes inherited from nfd::LocalFace
static const size_t LOCAL_CONTROL_FEATURE_MAX = 3
 
static const size_t LOCAL_CONTROL_FEATURE_ANY = 0
 upper bound of LocalControlFeature enum More...
 
- Protected Member Functions inherited from nfd::LocalFace
bool decodeAndDispatchInput (const Block &element)
 any feature More...
 
bool isEmptyFilteredLocalControlHeader (const ndn::nfd::LocalControlHeader &header) const
 Check if LocalControlHeader needs to be included, taking into account both set parameters in supplied LocalControlHeader and features enabled on the local face. More...
 
template<class Packet >
Block filterAndEncodeLocalControlHeader (const Packet &packet)
 Create LocalControlHeader, considering enabled features. More...
 
- Protected Member Functions inherited from nfd::Face
void setPersistency (ndn::nfd::FacePersistency persistency)
 
bool decodeAndDispatchInput (const Block &element)
 
void fail (const std::string &reason)
 fail the face and raise onFail event if it's UP; otherwise do nothing More...
 
FaceCountersgetMutableCounters ()
 

Detailed Description

Implementation of application Ndn face.

This class defines basic functionality of Ndn face. Face is core component responsible for actual delivery of data packet to and from Ndn stack

See also
AppFace, NdnNetDeviceFace

Definition at line 46 of file ndn-app-face.hpp.

Constructor & Destructor Documentation

ns3::ndn::AppFace::AppFace ( Ptr< App app)

Default constructor.

Definition at line 35 of file ndn-app-face.cpp.

ns3::ndn::AppFace::~AppFace ( )
virtual

Definition at line 45 of file ndn-app-face.cpp.

Member Function Documentation

void ns3::ndn::AppFace::sendInterest ( const Interest interest)
virtual

Send Interest towards application.

Definition at line 57 of file ndn-app-face.cpp.

References emitSignal, ns3::ndn::App::OnInterest(), and nfd::Face::onSendInterest.

void ns3::ndn::AppFace::sendData ( const Data data)
virtual

Send Data towards application.

Definition at line 68 of file ndn-app-face.cpp.

References emitSignal, ns3::ndn::App::OnData(), and nfd::Face::onSendData.

void ns3::ndn::AppFace::onReceiveInterest ( const Interest interest)

Send Interest towards NFD.

Definition at line 79 of file ndn-app-face.cpp.

References emitSignal.

void ns3::ndn::AppFace::onReceiveData ( const Data data)

Send Data towards NFD.

Definition at line 85 of file ndn-app-face.cpp.

References emitSignal.

void ns3::ndn::AppFace::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 51 of file ndn-app-face.cpp.

References nfd::Face::fail().


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