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.
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, 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)