30 BOOST_CONCEPT_ASSERT((boost::EqualityComparable<FaceQueryFilter>));
31 BOOST_CONCEPT_ASSERT((WireEncodable<FaceQueryFilter>));
32 BOOST_CONCEPT_ASSERT((WireDecodable<FaceQueryFilter>));
33 static_assert(std::is_base_of<tlv::Error, FaceQueryFilter::Error>::value,
34 "FaceQueryFilter::Error must inherit from tlv::Error");
43 template<encoding::Tag TAG>
47 size_t totalLength = 0;
54 if (m_facePersistency) {
81 totalLength += encoder.prependVarNumber(totalLength);
100 m_wire = buffer.block();
150 m_faceScope = readNonNegativeIntegerAs<FaceScope>(*val);
154 m_faceScope = nullopt;
158 m_facePersistency = readNonNegativeIntegerAs<FacePersistency>(*val);
162 m_facePersistency = nullopt;
166 m_linkType = readNonNegativeIntegerAs<LinkType>(*val);
170 m_linkType = nullopt;
206 m_uriScheme = uriScheme;
220 m_remoteUri = remoteUri;
234 m_localUri = localUri;
248 m_faceScope = faceScope;
256 m_faceScope = nullopt;
264 m_facePersistency = facePersistency;
272 m_facePersistency = nullopt;
280 m_linkType = linkType;
288 m_linkType = nullopt;
314 os <<
"FaceQueryFilter(";
316 os <<
"FaceID: " << filter.
getFaceId() <<
",\n";
328 os <<
"LocalUri: " << filter.
getLocalUri() <<
",\n";
340 os <<
"LinkType: " << filter.
getLinkType() <<
",\n";
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 Face Query Filter.
const std::string & getLocalUri() const
const Block & wireEncode() const
Encode FaceQueryFilter.
FaceQueryFilter & unsetUriScheme()
const std::string & getUriScheme() const
uint64_t getFaceId() const
FaceQueryFilter & unsetRemoteUri()
FaceQueryFilter & unsetFaceScope()
bool hasFacePersistency() const
bool hasRemoteUri() const
FaceQueryFilter & setRemoteUri(const std::string &remoteUri)
FaceQueryFilter & unsetLinkType()
bool hasUriScheme() const
LinkType getLinkType() const
FaceQueryFilter & unsetFaceId()
FaceQueryFilter & unsetFacePersistency()
FaceQueryFilter & setFaceScope(FaceScope faceScope)
FacePersistency getFacePersistency() const
FaceQueryFilter & setFaceId(uint64_t faceId)
FaceQueryFilter & setFacePersistency(FacePersistency facePersistency)
FaceQueryFilter & setLocalUri(const std::string &localUri)
void wireDecode(const Block &wire)
Decode FaceQueryFilter.
FaceScope getFaceScope() const
FaceQueryFilter & setLinkType(LinkType linkType)
FaceQueryFilter & unsetLocalUri()
bool hasFaceScope() const
FaceQueryFilter & setUriScheme(const std::string &uriScheme)
const std::string & getRemoteUri() 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)