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

Data header. More...

#include <ndn-data.h>

Inheritance diagram for ns3::ndn::Data:
Collaboration diagram for ns3::ndn::Data:

Classes

class  Ccnb
 
class  ndnSIM
 

Public Member Functions

 Data (Ptr< Packet > payload=Create< Packet >())
 Constructor. More...
 
 Data (const Data &other)
 Copy constructor.
 
void SetName (Ptr< Name > name)
 Set content object name. More...
 
void SetName (const Name &name)
 Another, less efficient, variant of setting content object name. More...
 
const NameGetName () const
 Get name of the content object.
 
Ptr< const NameGetNamePtr () const
 Get smart pointer to the interest name (to avoid extra memory usage)
 
void SetTimestamp (const Time &timestamp)
 Set content object timestamp. More...
 
Time GetTimestamp () const
 Get timestamp of the content object.
 
void SetFreshness (const Time &freshness)
 Set freshness of the content object. More...
 
Time GetFreshness () const
 Get freshness of the content object.
 
void SetSignature (uint32_t signature)
 Set "fake" signature on the content object. More...
 
uint32_t GetSignature () const
 Get "fake" signature of the content object. More...
 
void SetKeyLocator (Ptr< Name > keyLocator)
 Set key locator. More...
 
Ptr< const NameGetKeyLocator () const
 Get key locator. More...
 
void SetPayload (Ptr< Packet > payload)
 Get payload of data packet. More...
 
Ptr< const Packet > GetPayload () const
 Set payload of data packet. More...
 
Ptr< const Packet > GetWire () const
 Get wire formatted packet. More...
 
void SetWire (Ptr< const Packet > packet) const
 Set (cache) wire formatted packet.
 
void Print (std::ostream &os) const
 Print Interest in plain-text to the specified output stream.
 

Detailed Description

Data header.

Definition at line 39 of file ndn-data.h.

Constructor & Destructor Documentation

ns3::ndn::Data::Data ( Ptr< Packet >  payload = Create<Packet> ())

Constructor.

Creates a null header

Definition at line 33 of file ndn-data.cc.

Member Function Documentation

Ptr< const Name > ns3::ndn::Data::GetKeyLocator ( ) const

Get key locator.

Note that only <KeyName> option for the key locator is supported

Definition at line 135 of file ndn-data.cc.

Referenced by Data().

Ptr< const Packet > ns3::ndn::Data::GetPayload ( ) const

Set payload of data packet.

This payload can also carry packet tags

Definition at line 155 of file ndn-data.cc.

uint32_t ns3::ndn::Data::GetSignature ( ) const

Get "fake" signature of the content object.

Values for the signature totally depend on the application

Definition at line 123 of file ndn-data.cc.

Ptr< const Packet > ns3::ndn::Data::GetWire ( ) const
inline

Get wire formatted packet.

If wire formatted packet has not been set before, 0 will be returned

Definition at line 206 of file ndn-data.h.

void ns3::ndn::Data::SetFreshness ( const Time &  freshness)

Set freshness of the content object.

Parameters
freshnessFreshness, 0s means infinity

Definition at line 102 of file ndn-data.cc.

Referenced by ns3::ndn::wire::ccnb::DataVisitor::visit().

void ns3::ndn::Data::SetKeyLocator ( Ptr< Name keyLocator)

Set key locator.

Parameters
keyLocatorname of the key

Definition at line 129 of file ndn-data.cc.

Referenced by ns3::ndn::wire::ccnb::DataVisitor::visit().

void ns3::ndn::Data::SetName ( Ptr< Name name)

Set content object name.

Sets name of the content object

Definition at line 61 of file ndn-data.cc.

Referenced by ns3::ndn::wire::ccnb::DataVisitor::visit().

void ns3::ndn::Data::SetName ( const Name name)

Another, less efficient, variant of setting content object name.

Sets name of the content object

Definition at line 68 of file ndn-data.cc.

void ns3::ndn::Data::SetPayload ( Ptr< Packet >  payload)

Get payload of data packet.

This payload can also carry packet tags

Definition at line 148 of file ndn-data.cc.

void ns3::ndn::Data::SetSignature ( uint32_t  signature)

Set "fake" signature on the content object.

Parameters
signatureuint32_t number, simulating content object signature

Values for the signature totally depend on the application

Definition at line 116 of file ndn-data.cc.

Referenced by ns3::ndn::wire::ccnb::DataVisitor::visit().

void ns3::ndn::Data::SetTimestamp ( const Time &  timestamp)

Set content object timestamp.

Parameters
timestamptimestamp

Definition at line 89 of file ndn-data.cc.

Referenced by ns3::ndn::wire::ccnb::DataVisitor::visit().


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