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()
72 ForwarderStatusManager::listGeneralStatus(
const Name& topPrefix,
const Interest& interest,
77 auto status = this->collectGeneralStatus();
80 for (
const auto& subblock : wire.elements()) {
ForwarderStatus & setNFibEntries(uint64_t nFibEntries)
const ForwarderCounters & getCounters() const
represents NFD General Status dataset
StatusDatasetContext & setExpiry(const time::milliseconds &expiry)
set expiration duration
size_t wireEncode(EncodingImpl< TAG > &encoder) const
prepend ForwarderStatus as a Content block to the encoder
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 & setNInData(uint64_t nInData)
ForwarderStatus & setNOutData(uint64_t nOutData)
ForwarderStatus & setNInNacks(uint64_t nInNacks)
PacketCounter nInInterests
static time_point now() noexcept
Authorization makeAcceptAllAuthorization()
return an Authorization that accepts all Interests, with empty string as requester
ForwarderStatus & setNSatisfiedInterests(uint64_t nSatisfiedInterests)
size_t size() const
get number of stored packets
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)
ForwarderStatus & setNUnsatisfiedInterests(uint64_t nUnsatisfiedInterests)
ForwarderStatus & setNMeasurementsEntries(uint64_t nMeasurementsEntries)
PacketCounter nOutInterests
PacketCounter nSatisfiedInterests
ForwarderStatus & setNPitEntries(uint64_t nPitEntries)
ForwarderStatus & setNCsEntries(uint64_t nCsEntries)
Measurements & getMeasurements()
void append(const Block &block)
append a Block to the response
void addStatusDataset(const PartialName &relPrefix, Authorization authorize, StatusDatasetHandler handle)
register a StatusDataset or a prefix under which StatusDatasets can be requested
provides a context for generating response to a StatusDataset request
ForwarderStatus & setNNameTreeEntries(uint64_t nNameTreeEntries)
ForwarderStatus & setCurrentTimestamp(const time::system_clock::TimePoint ¤tTimestamp)
ForwarderStatusManager(Forwarder &forwarder, Dispatcher &dispatcher)
PacketCounter nUnsatisfiedInterests