37 template<encoding::Tag TAG>
41 size_t totalLength = 0;
52 totalLength += encoder.prependVarNumber(totalLength);
87 m_kind = readNonNegativeIntegerAs<FaceEventKind>(*val);
91 NDN_THROW(Error(
"missing required FaceEventKind field"));
99 NDN_THROW(Error(
"missing required FaceId field"));
107 NDN_THROW(Error(
"missing required Uri field"));
115 NDN_THROW(Error(
"missing required LocalUri field"));
119 m_faceScope = readNonNegativeIntegerAs<FaceScope>(*val);
123 NDN_THROW(Error(
"missing required FaceScope field"));
131 NDN_THROW(Error(
"missing required FacePersistency field"));
135 m_linkType = readNonNegativeIntegerAs<LinkType>(*val);
139 NDN_THROW(Error(
"missing required LinkType field"));
147 NDN_THROW(Error(
"missing required Flags field"));
175 os <<
"FaceEvent(Kind: " << notification.
getKind() <<
",\n"
176 <<
" FaceId: " << notification.
getFaceId() <<
",\n"
177 <<
" RemoteUri: " << notification.
getRemoteUri() <<
",\n"
178 <<
" LocalUri: " << notification.
getLocalUri() <<
",\n"
179 <<
" FaceScope: " << notification.
getFaceScope() <<
",\n"
181 <<
" LinkType: " << notification.
getLinkType() <<
",\n"
Helper class to convert a number to hexadecimal format, for use with stream insertion operators.
Represents a TLV element of the NDN packet format.
element_const_iterator elements_begin() const noexcept
Equivalent to elements().begin().
element_const_iterator elements_end() const noexcept
Equivalent to elements().end().
bool hasWire() const noexcept
Check if the Block contains a fully encoded wire representation.
uint32_t type() const noexcept
Return the TLV-TYPE of the Block.
void reset() noexcept
Reset the Block to a default-constructed state.
void parse() const
Parse TLV-VALUE into sub-elements.
Represents a Face status change notification.
const Block & wireEncode() const
Encode FaceEventNotification.
FaceEventNotification & setKind(FaceEventKind kind)
FaceEventKind getKind() const
void wireDecode(const Block &wire)
Decode FaceEventNotification.
uint64_t getFlags() const
FacePersistency m_facePersistency
const std::string & getLocalUri() const
const std::string & getRemoteUri() const
FacePersistency getFacePersistency() const
uint64_t getFaceId() const
FaceScope getFaceScope() const
LinkType getLinkType() const
#define NDN_CXX_DEFINE_WIRE_ENCODE_INSTANTIATIONS(ClassName)
EncodingImpl< EstimatorTag > EncodingEstimator
uint64_t readNonNegativeInteger(const Block &block)
Read a non-negative integer from a TLV element.
size_t prependNonNegativeIntegerBlock(EncodingImpl< TAG > &encoder, uint32_t type, uint64_t value)
Prepend a TLV element containing a non-negative integer.
size_t prependStringBlock(EncodingImpl< TAG > &encoder, uint32_t type, std::string_view value)
Prepend a TLV element containing a string.
std::string readString(const Block &block)
Read the TLV-VALUE of a TLV element as a string.
EncodingImpl< EncoderTag > EncodingBuffer
Contains classes and functions related to the NFD Management protocol.
std::ostream & operator<<(std::ostream &os, FaceScope faceScope)
bool operator==(const ChannelStatus &a, const ChannelStatus &b)