30 BOOST_CONCEPT_ASSERT((StatusDatasetItem<ChannelStatus>));
39 template<encoding::Tag TAG>
43 size_t totalLength = 0;
45 totalLength += encoder.prependVarNumber(totalLength);
64 m_wire = buffer.block();
72 BOOST_THROW_EXCEPTION(
Error(
"Expecting ChannelStatus block"));
83 BOOST_THROW_EXCEPTION(
Error(
"Missing required LocalUri field"));
91 m_localUri = localUri;
104 return os <<
"Channel(LocalUri: " << status.
getLocalUri() <<
")";
Copyright (c) 2013-2017 Regents of the University of California.
element_container::const_iterator element_const_iterator
Represents a TLV element of NDN packet format.
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.
const std::string & getLocalUri() const
bool operator==(const ChannelStatus &a, const ChannelStatus &b)
const Block & wireEncode() const
#define NDN_CXX_DEFINE_WIRE_ENCODE_INSTANTIATIONS(ClassName)
std::ostream & operator<<(std::ostream &os, FaceScope faceScope)
void reset()
Reset wire buffer of the element.
void parse() const
Parse TLV-VALUE into sub elements.
uint32_t type() const
Get TLV-TYPE.
bool hasWire() const
Check if the Block has fully encoded wire.
represents an item in NFD Channel dataset
element_const_iterator elements_end() const
Equivalent to elements().end()
element_const_iterator elements_begin() const
Equivalent to elements().begin()
void wireDecode(const Block &wire)
EncodingImpl< EncoderTag > EncodingBuffer
EncodingImpl< EstimatorTag > EncodingEstimator
ChannelStatus & setLocalUri(const std::string localUri)