|
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.
44 template<encoding::Tag TAG>
48 size_t totalLength = 0;
59 totalLength += encoder.prependVarNumber(totalLength);
94 m_kind = readNonNegativeIntegerAs<FaceEventKind>(*val);
98 NDN_THROW(Error(
"missing required FaceEventKind field"));
106 NDN_THROW(Error(
"missing required FaceId field"));
114 NDN_THROW(Error(
"missing required Uri field"));
122 NDN_THROW(Error(
"missing required LocalUri field"));
126 m_faceScope = readNonNegativeIntegerAs<FaceScope>(*val);
130 NDN_THROW(Error(
"missing required FaceScope field"));
138 NDN_THROW(Error(
"missing required FacePersistency field"));
142 m_linkType = readNonNegativeIntegerAs<LinkType>(*val);
146 NDN_THROW(Error(
"missing required LinkType field"));
154 NDN_THROW(Error(
"missing required Flags field"));
182 os <<
"FaceEvent(Kind: " << notification.
getKind() <<
",\n"
183 <<
" FaceId: " << notification.
getFaceId() <<
",\n"
184 <<
" RemoteUri: " << notification.
getRemoteUri() <<
",\n"
185 <<
" LocalUri: " << notification.
getLocalUri() <<
",\n"
186 <<
" FaceScope: " << notification.
getFaceScope() <<
",\n"
188 <<
" LinkType: " << notification.
getLinkType() <<
",\n"
FaceScope getFaceScope() const
const std::string & getRemoteUri() const
FaceEventNotification & setKind(FaceEventKind kind)
std::ostream & operator<<(std::ostream &os, FaceScope faceScope)
Helper class to convert a number to hexadecimal format, for use with stream insertion operators.
element_const_iterator elements_begin() const
Equivalent to elements().begin()
std::string readString(const Block &block)
Read TLV-VALUE of a TLV element as a string.
FaceEventKind getKind() const
uint64_t getFlags() const
void reset() noexcept
Reset the Block to a default-constructed state.
uint64_t getFaceId() const
EncodingImpl< EstimatorTag > EncodingEstimator
uint64_t readNonNegativeInteger(const Block &block)
Read a non-negative integer from a TLV element.
represents a Face status change notification
Copyright (c) 2011-2015 Regents of the University of California.
uint32_t type() const
Return the TLV-TYPE of the Block.
const std::string & getLocalUri() const
FacePersistency m_facePersistency
void parse() const
Parse TLV-VALUE into sub-elements.
size_t prependNonNegativeIntegerBlock(EncodingImpl< TAG > &encoder, uint32_t type, uint64_t value)
Prepend a TLV element containing a non-negative integer.
const Block & wireEncode() const
encode FaceEventNotification
Represents a TLV element of NDN packet format.
element_const_iterator elements_end() const
Equivalent to elements().end()
FacePersistency getFacePersistency() const
bool hasWire() const noexcept
Check if the Block contains a fully encoded wire representation.
bool operator==(const ChannelStatus &a, const ChannelStatus &b)
void wireDecode(const Block &wire)
decode FaceEventNotification
size_t prependStringBlock(EncodingImpl< TAG > &encoder, uint32_t type, const std::string &value)
Prepend a TLV element containing a string.
LinkType getLinkType() const
NDN_CXX_DEFINE_WIRE_ENCODE_INSTANTIATIONS(ChannelStatus)
Copyright (c) 2011-2015 Regents of the University of California.
EncodingImpl< EncoderTag > EncodingBuffer
concept check for an item in a Notification Stream