28 #include "core/version.hpp" 35 : m_forwarder(forwarder)
36 , m_dispatcher(dispatcher)
37 , m_startTimestamp(
time::system_clock::now())
40 bind(&ForwarderStatusManager::listGeneralStatus,
this, _1, _2, _3));
44 ForwarderStatusManager::collectGeneralStatus()
70 ForwarderStatusManager::listGeneralStatus(
const Name& topPrefix,
const Interest& interest,
75 auto status = this->collectGeneralStatus();
76 const Block& wire = status.wireEncode();
78 for (
const auto& subblock : wire.
elements()) {
const ForwarderCounters & getCounters() const
ForwarderStatus & setNOutDatas(uint64_t nOutDatas)
represents NFD Forwarder Status
StatusDatasetContext & setExpiry(const time::milliseconds &expiry)
set expiration duration
ForwarderStatus & setNFibEntries(size_t nFibEntries)
static const time::milliseconds STATUS_FRESHNESS(5000)
counters provided by Forwarder
ForwarderStatus & setNOutNacks(uint64_t nOutNacks)
represents a dispatcher on server side of NFD Management protocol
ForwarderStatus & setNInNacks(uint64_t nInNacks)
void parse() const
Parse wire buffer into subblocks.
PacketCounter nInInterests
Class representing a wire element of NDN-TLV packet format.
represents an Interest packet
ForwarderStatus & setNCsEntries(size_t nCsEntries)
static time_point now() noexcept
Authorization makeAcceptAllAuthorization()
ForwarderStatus & setNNameTreeEntries(size_t nNameTreeEntries)
ForwarderStatus & setNInInterests(uint64_t nInInterests)
ForwarderStatus & setStartTimestamp(const time::system_clock::TimePoint &startTimestamp)
Copyright (c) 2011-2015 Regents of the University of California.
void end()
end the response successfully after appending zero or more blocks
ForwarderStatus & setNfdVersion(const std::string &nfdVersion)
ForwarderStatus & setNOutInterests(uint64_t nOutInterests)
Name abstraction to represent an absolute name.
ForwarderStatus & setNPitEntries(size_t nPitEntries)
PacketCounter nOutInterests
void addStatusDataset(const PartialName &relPrefix, const Authorization &authorization, const StatusDatasetHandler &handler)
register a StatusDataset or a prefix under which StatusDatasets can be requested
const element_container & elements() const
Get all subelements.
ForwarderStatus & setNInDatas(uint64_t nInDatas)
Measurements & getMeasurements()
void append(const Block &block)
append a Block to the response
provides a context for generating response to a StatusDataset request
ForwarderStatus & setNMeasurementsEntries(size_t nMeasurementsEntries)
ForwarderStatus & setCurrentTimestamp(const time::system_clock::TimePoint ¤tTimestamp)
ForwarderStatusManager(Forwarder &forwarder, Dispatcher &dispatcher)