|
NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: NDN, CCN, CCNx, content centric networks
|
API Documentation
|
Go to the documentation of this file.
67 template<encoding::Tag TAG>
173 setContent(
const uint8_t* value,
size_t valueSize);
221 const optional<name::Component>&
243 mutable Block m_wire;
244 mutable Name m_fullName;
248 extern template size_t
249 Data::wireEncode<encoding::EncoderTag>(
EncodingBuffer&,
bool)
const;
251 extern template size_t
264 return !(lhs == rhs);
269 #endif // NDN_DATA_HPP
uint32_t getContentType() const
Data & setContentType(uint32_t type)
Data & setMetaInfo(const MetaInfo &metaInfo)
Set MetaInfo.
void resetWire()
Clear wire encoding and cached FullName.
const Block & getContent() const
Get Content.
Data & setName(const Name &name)
Set name.
const Name & getName() const
Get name.
bool hasWire() const
Check if this instance has cached wire encoding.
time::milliseconds getFreshnessPeriod() const
EncodingImpl< EstimatorTag > EncodingEstimator
Represents an absolute name.
void wireDecode(const Block &wire)
Decode from wire in NDN Packet Format v0.2 or v0.3.
Holds SignatureInfo and SignatureValue in a Data packet.
Data & setContent(const Block &block)
Set Content from a block.
Data & setSignatureValue(const Block &value)
Set SignatureValue.
Data & setFreshnessPeriod(time::milliseconds freshnessPeriod)
Represents a Data packet.
Data & setSignature(const Signature &signature)
Set Signature.
const optional< name::Component > & getFinalBlock() const
Data & setFinalBlock(optional< name::Component > finalBlockId)
Represents a TLV element of NDN packet format.
bool operator==(const Data &lhs, const Data &rhs)
std::ostream & operator<<(std::ostream &os, const Data &data)
const Block & wireEncode() const
Encode to a Block.
bool hasWire() const noexcept
Check if the Block contains a fully encoded wire representation.
const MetaInfo & getMetaInfo() const
Get MetaInfo.
Data(const Name &name=Name())
Construct an unsigned Data packet with given name and empty Content.
base class to allow simple management of packet tags
represents an error in TLV encoding or decoding
const Name & getFullName() const
Get full name including implicit digest.
bool operator!=(const Data &lhs, const Data &rhs)
Error(const char *expectedType, uint32_t actualType)
shared_ptr< const Buffer > ConstBufferPtr
Copyright (c) 2011-2015 Regents of the University of California.
EncodingImpl< EncoderTag > EncodingBuffer
const Signature & getSignature() const
Get Signature.