35 template<encoding::Tag TAG>
39 size_t totalLength = 0;
46 if (m_facePersistency) {
73 totalLength += encoder.prependVarNumber(totalLength);
92 m_wire = buffer.block();
114 m_faceId = std::nullopt;
142 m_faceScope = readNonNegativeIntegerAs<FaceScope>(*val);
146 m_faceScope = std::nullopt;
150 m_facePersistency = readNonNegativeIntegerAs<FacePersistency>(*val);
154 m_facePersistency = std::nullopt;
158 m_linkType = readNonNegativeIntegerAs<LinkType>(*val);
162 m_linkType = std::nullopt;
190 m_faceId = std::nullopt;
198 m_uriScheme = uriScheme;
212 m_remoteUri = remoteUri;
226 m_localUri = localUri;
240 m_faceScope = faceScope;
248 m_faceScope = std::nullopt;
256 m_facePersistency = facePersistency;
264 m_facePersistency = std::nullopt;
272 m_linkType = linkType;
280 m_linkType = std::nullopt;
306 os <<
"FaceQueryFilter(";
308 os <<
"FaceID: " << filter.
getFaceId() <<
",\n";
320 os <<
"LocalUri: " << filter.
getLocalUri() <<
",\n";
332 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, 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)