NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.0: NDN, CCN, CCNx, content centric networks
API Documentation
nfd-channel-status.hpp
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
22 #ifndef NDN_MANAGEMENT_NFD_CHANNEL_STATUS_HPP
23 #define NDN_MANAGEMENT_NFD_CHANNEL_STATUS_HPP
24 
25 #include "../encoding/block.hpp"
26 
27 namespace ndn {
28 namespace nfd {
29 
36 {
37 public:
38  class Error : public tlv::Error
39  {
40  public:
41  explicit
42  Error(const std::string& what)
43  : tlv::Error(what)
44  {
45  }
46  };
47 
48  ChannelStatus();
49 
50  explicit
51  ChannelStatus(const Block& payload);
52 
53  template<encoding::Tag TAG>
54  size_t
55  wireEncode(EncodingImpl<TAG>& encoder) const;
56 
57  const Block&
58  wireEncode() const;
59 
60  void
61  wireDecode(const Block& wire);
62 
63 public: // getters & setters
64  const std::string&
65  getLocalUri() const
66  {
67  return m_localUri;
68  }
69 
71  setLocalUri(const std::string localUri);
72 
73 private:
74  std::string m_localUri;
75 
76  mutable Block m_wire;
77 };
78 
79 } // namespace nfd
80 } // namespace ndn
81 
82 #endif // NDN_MANAGEMENT_NFD_CHANNEL_STATUS_HPP
Copyright (c) 2011-2015 Regents of the University of California.
const std::string & getLocalUri() const
const Block & wireEncode() const
Error(const std::string &what)
Class representing a wire element of NDN-TLV packet format.
Definition: block.hpp:43
Copyright (c) 2011-2015 Regents of the University of California.
Definition: ndn-common.hpp:40
represents NFD Channel Status dataset
void wireDecode(const Block &wire)
represents an error in TLV encoding or decoding
Definition: tlv.hpp:50
ChannelStatus & setLocalUri(const std::string localUri)