#include <ndn-data.h>
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 Name & | GetName () const |
Get name of the content object. | |
Ptr< const Name > | GetNamePtr () const |
Get smart pointer to the interest name (to avoid extra memory usage) | |
void | SetTimestamp (const Time ×tamp) |
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 Name > | GetKeyLocator () 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. | |
Data header.
Definition at line 39 of file ndn-data.h.
ns3::ndn::Data::Data | ( | Ptr< Packet > | payload = Create<Packet> () | ) |
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.
|
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.
freshness | Freshness, 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.
keyLocator | name 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.
signature | uint32_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.
timestamp | timestamp |
Definition at line 89 of file ndn-data.cc.
Referenced by ns3::ndn::wire::ccnb::DataVisitor::visit().