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

A simple Interest-sink applia simple Interest-sink application. More...

#include <ndn-producer.hpp>

Inheritance diagram for ns3::ndn::Producer:
Collaboration diagram for ns3::ndn::Producer:

Public Member Functions

 Producer ()
 
virtual void OnInterest (shared_ptr< const Interest > interest)
 Method that will be called every time new Interest arrives. More...
 
- Public Member Functions inherited from ns3::ndn::App
 App ()
 Default constructor. More...
 
virtual ~App ()
 
uint32_t GetId () const
 Get application ID (ID of applications face) More...
 
virtual void OnData (shared_ptr< const Data > data)
 Method that will be called every time new Data arrives. More...
 
virtual void OnNack (shared_ptr< const lp::Nack > nack)
 Method that will be called every time new Nack arrives. More...
 

Static Public Member Functions

static TypeId GetTypeId (void)
 
- Static Public Member Functions inherited from ns3::ndn::App
static TypeId GetTypeId ()
 

Protected Member Functions

virtual void StartApplication ()
 Called at time specified by Start. More...
 
virtual void StopApplication ()
 Called at time specified by Stop. More...
 
- Protected Member Functions inherited from ns3::ndn::App
virtual void DoInitialize ()
 
virtual void DoDispose ()
 

Additional Inherited Members

- Public Types inherited from ns3::ndn::App
typedef void(* InterestTraceCallback) (shared_ptr< const Interest >, Ptr< App >, shared_ptr< Face >)
 
typedef void(* DataTraceCallback) (shared_ptr< const Data >, Ptr< App >, shared_ptr< Face >)
 
typedef void(* NackTraceCallback) (shared_ptr< const lp::Nack >, Ptr< App >, shared_ptr< Face >)
 
- Protected Attributes inherited from ns3::ndn::App
bool m_active
 Flag to indicate that application is active (set by StartApplication and StopApplication) More...
 
shared_ptr< Facem_face
 
AppLinkServicem_appLink
 
uint32_t m_appId
 
TracedCallback< shared_ptr< const Interest >, Ptr< App >, shared_ptr< Face > > m_receivedInterests
 App-level trace of received Interests. More...
 
TracedCallback< shared_ptr< const Data >, Ptr< App >, shared_ptr< Face > > m_receivedDatas
 App-level trace of received Data. More...
 
TracedCallback< shared_ptr< const lp::Nack >, Ptr< App >, shared_ptr< Face > > m_receivedNacks
 App-level trace of received Nacks. More...
 
TracedCallback< shared_ptr< const Interest >, Ptr< App >, shared_ptr< Face > > m_transmittedInterests
 App-level trace of transmitted Interests. More...
 
TracedCallback< shared_ptr< const Data >, Ptr< App >, shared_ptr< Face > > m_transmittedDatas
 App-level trace of transmitted Data. More...
 
TracedCallback< shared_ptr< const lp::Nack >, Ptr< App >, shared_ptr< Face > > m_transmittedNacks
 App-level trace of transmitted Nacks. More...
 

Detailed Description

A simple Interest-sink applia simple Interest-sink application.

A simple Interest-sink applia simple Interest-sink application, which replying every incoming Interest with Data packet with a specified size and name same as in Interest.cation, which replying every incoming Interest with Data packet with a specified size and name same as in Interest.

Config Paths

ns3::ndn::Producer is accessible through the following paths with Config::Set and Config::Connect:

  • "/NodeList/[i]/ApplicationList/[i]/$ns3::ndn::App/$ns3::ndn::Producer"
  • "/NodeList/[i]/ApplicationList/[i]/$ns3::ndn::Producer"

Attributes

  • Prefix: Prefix, for which producer has the data
    • Set with class: NameValue
    • Underlying type: Name
    • Initial value: /
    • Flags: construct write read
  • Postfix: Postfix that is added to the output data (e.g., for adding producer-uniqueness)
    • Set with class: NameValue
    • Underlying type: Name
    • Initial value: /
    • Flags: construct write read
  • PayloadSize: Virtual payload size for Content packets
    • Set with class: ns3::UintegerValue
    • Underlying type: uint32_t 0:4294967295
    • Initial value: 1024
    • Flags: construct write read
  • Freshness: Freshness of data packets, if 0, then unlimited freshness
    • Set with class: ns3::TimeValue
    • Underlying type: Time –9223372036854775808.0ns:+9223372036854775807.0ns
    • Initial value: +0.0ns
    • Flags: construct write read
  • Signature: Fake signature, 0 valid signature (default), other values application-specific
    • Set with class: ns3::UintegerValue
    • Underlying type: uint32_t 0:4294967295
    • Initial value: 0
    • Flags: construct write read
  • KeyLocator: Name to be used for key locator. If root, then key locator is not used
    • Set with class: NameValue
    • Underlying type: Name
    • Initial value: /
    • Flags: construct write read

Attributes defined in parent class ns3::Application

  • StartTime: Time at which the application will start
    • Set with class: ns3::TimeValue
    • Underlying type: Time –9223372036854775808.0ns:+9223372036854775807.0ns
    • Initial value: +0.0ns
    • Flags: construct write read
  • StopTime: Time at which the application will stop
    • Set with class: ns3::TimeValue
    • Underlying type: Time –9223372036854775808.0ns:+9223372036854775807.0ns
    • Initial value: +0.0ns
    • Flags: construct write read

No TraceSources are defined for this type.

TraceSources defined in parent class ns3::ndn::App

Size of this type is 576 bytes (on a 64-bit architecture).

Definition at line 43 of file ndn-producer.hpp.

Constructor & Destructor Documentation

◆ Producer()

ns3::ndn::Producer::Producer ( )

Definition at line 70 of file ndn-producer.cpp.

Member Function Documentation

◆ GetTypeId()

TypeId ns3::ndn::Producer::GetTypeId ( void  )
static

Definition at line 40 of file ndn-producer.cpp.

References ns3::ndn::MakeNameAccessor(), and ns3::ndn::MakeNameChecker().

◆ OnInterest()

void ns3::ndn::Producer::OnInterest ( shared_ptr< const Interest >  interest)
virtual

◆ StartApplication()

void ns3::ndn::Producer::StartApplication ( )
protectedvirtual

Called at time specified by Start.

Reimplemented from ns3::ndn::App.

Definition at line 77 of file ndn-producer.cpp.

References ns3::ndn::FibHelper::AddRoute(), ns3::ndn::App::m_face, and ns3::ndn::App::StartApplication().

◆ StopApplication()

void ns3::ndn::Producer::StopApplication ( )
protectedvirtual

Called at time specified by Stop.

Reimplemented from ns3::ndn::App.

Definition at line 86 of file ndn-producer.cpp.

References ns3::ndn::App::StopApplication().


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