30 BOOST_CONCEPT_ASSERT((boost::EqualityComparable<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();
109 BOOST_THROW_EXCEPTION(
Error(
"expecting FaceQueryFilter block"));
149 m_faceScope = readNonNegativeIntegerAs<FaceScope>(*val);
157 m_facePersistency = readNonNegativeIntegerAs<FacePersistency>(*val);
165 m_linkType = readNonNegativeIntegerAs<LinkType>(*val);
205 m_uriScheme = uriScheme;
219 m_remoteUri = remoteUri;
233 m_localUri = localUri;
247 m_faceScope = faceScope;
263 m_facePersistency = facePersistency;
279 m_linkType = linkType;
313 os <<
"FaceQueryFilter(";
315 os <<
"FaceID: " << filter.
getFaceId() <<
",\n";
327 os <<
"LocalUri: " << filter.
getLocalUri() <<
",\n";
339 os <<
"LinkType: " << filter.
getLinkType() <<
",\n";
LinkType getLinkType() const
bool hasFaceScope() const
bool hasWire() const
Check if the Block has fully encoded wire.
Copyright (c) 2011-2015 Regents of the University of California.
FaceQueryFilter & unsetLocalUri()
size_t prependNonNegativeIntegerBlock(EncodingImpl< TAG > &encoder, uint32_t type, uint64_t value)
Prepend a TLV element containing a non-negative integer.
const std::string & getLocalUri() const
FaceScope getFaceScope() const
element_container::const_iterator element_const_iterator
void parse() const
Parse TLV-VALUE into sub elements.
NDN_CXX_DEFINE_WIRE_ENCODE_INSTANTIATIONS(ChannelStatus)
Represents a TLV element of NDN packet format.
const std::string & getRemoteUri() const
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.
element_const_iterator elements_begin() const
Equivalent to elements().begin()
bool hasRemoteUri() const
uint64_t readNonNegativeInteger(const Block &block)
Read a non-negative integer from a TLV element.
FaceQueryFilter & unsetFaceScope()
FaceQueryFilter & setLocalUri(const std::string &localUri)
element_const_iterator elements_end() const
Equivalent to elements().end()
bool hasUriScheme() const
Copyright (c) 2011-2015 Regents of the University of California.
uint64_t getFaceId() const
bool operator==(const ChannelStatus &a, const ChannelStatus &b)
const Block & wireEncode() const
encode FaceQueryFilter
FaceQueryFilter & setFaceScope(FaceScope faceScope)
FaceQueryFilter & unsetFaceId()
std::ostream & operator<<(std::ostream &os, FaceScope faceScope)
void reset()
Reset wire buffer of the element.
FaceQueryFilter & setUriScheme(const std::string &uriScheme)
FaceQueryFilter & unsetFacePersistency()
represents Face Query Filter
FaceQueryFilter & unsetUriScheme()
FaceQueryFilter & unsetRemoteUri()
FaceQueryFilter & setRemoteUri(const std::string &remoteUri)
FaceQueryFilter & setFaceId(uint64_t faceId)
const std::string & getUriScheme() const
FaceQueryFilter & setLinkType(LinkType linkType)
FaceQueryFilter & setFacePersistency(FacePersistency facePersistency)
FacePersistency getFacePersistency() const
a concept check for TLV abstraction with .wireEncode method
bool hasFacePersistency() const
void wireDecode(const Block &wire)
decode FaceQueryFilter
a concept check for TLV abstraction with .wireDecode method and constructible from Block
EncodingImpl< EncoderTag > EncodingBuffer
const nullopt_t nullopt((nullopt_t::init()))
uint32_t type() const
Get TLV-TYPE.
EncodingImpl< EstimatorTag > EncodingEstimator
FaceQueryFilter & unsetLinkType()