32 BOOST_CONCEPT_ASSERT((NotificationStreamItem<FaceEventNotification>));
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"
Helper class to convert a number to hexadecimal format, for use with stream insertion operators.
Represents a TLV element of the NDN packet format.
uint32_t type() const
Return the TLV-TYPE of the Block.
bool hasWire() const noexcept
Check if the Block contains a fully encoded wire representation.
element_const_iterator elements_end() const
Equivalent to elements().end()
element_const_iterator elements_begin() const
Equivalent to elements().begin()
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, const std::string &value)
Prepend a TLV element containing a string.
std::string readString(const Block &block)
Read TLV-VALUE of a TLV element as a string.
EncodingImpl< EncoderTag > EncodingBuffer
std::ostream & operator<<(std::ostream &os, FaceScope faceScope)
bool operator==(const ChannelStatus &a, const ChannelStatus &b)