55 const function<
void()>& onSuccess,
56 const Controller::DatasetFailCallback& onFailure,
57 const CommandOptions& options)
59 controller.fetch<ndn::nfd::FaceDataset>(
60 [
this, onSuccess] (
const std::vector<FaceStatus>& result) {
71 for (
const FaceStatus& item : m_status) {
82 os <<
"<faceId>" << item.getFaceId() <<
"</faceId>";
83 os <<
"<remoteUri>" <<
xml::Text{item.getRemoteUri()} <<
"</remoteUri>";
84 os <<
"<localUri>" <<
xml::Text{item.getLocalUri()} <<
"</localUri>";
86 if (item.hasExpirationPeriod()) {
88 <<
"</expirationPeriod>";
90 os <<
"<faceScope>" << item.getFaceScope() <<
"</faceScope>";
91 os <<
"<facePersistency>" << item.getFacePersistency() <<
"</facePersistency>";
92 os <<
"<linkType>" << item.getLinkType() <<
"</linkType>";
94 if (item.getFlags() == 0) {
99 if (item.getFlagBit(ndn::nfd::BIT_LOCAL_FIELDS_ENABLED)) {
100 os <<
"<localFieldsEnabled/>";
105 os <<
"<packetCounters>";
106 os <<
"<incomingPackets>"
107 <<
"<nInterests>" << item.getNInInterests() <<
"</nInterests>"
108 <<
"<nDatas>" << item.getNInDatas() <<
"</nDatas>"
109 <<
"<nNacks>" << item.getNInNacks() <<
"</nNacks>"
110 <<
"</incomingPackets>";
111 os <<
"<outgoingPackets>"
112 <<
"<nInterests>" << item.getNOutInterests() <<
"</nInterests>"
113 <<
"<nDatas>" << item.getNOutDatas() <<
"</nDatas>"
114 <<
"<nNacks>" << item.getNOutNacks() <<
"</nNacks>"
115 <<
"</outgoingPackets>";
116 os <<
"</packetCounters>";
118 os <<
"<byteCounters>";
119 os <<
"<incomingBytes>" << item.getNInBytes() <<
"</incomingBytes>";
120 os <<
"<outgoingBytes>" << item.getNOutBytes() <<
"</outgoingBytes>";
121 os <<
"</byteCounters>";
130 for (
const FaceStatus& item : m_status) {
138 os <<
" faceid=" << item.getFaceId();
139 os <<
" remote=" << item.getRemoteUri();
140 os <<
" local=" << item.getLocalUri();
142 if (item.hasExpirationPeriod()) {
146 os <<
" counters={in={"
147 << item.getNInInterests() <<
"i "
148 << item.getNInDatas() <<
"d "
149 << item.getNInNacks() <<
"n "
150 << item.getNInBytes() <<
"B} ";
152 << item.getNOutInterests() <<
"i "
153 << item.getNOutDatas() <<
"d "
154 << item.getNOutNacks() <<
"n "
155 << item.getNOutBytes() <<
"B}}";
157 os <<
" " << item.getFaceScope();
158 os <<
" " << item.getFacePersistency();
159 os <<
" " << item.getLinkType();
162 if (item.getFlagBit(ndn::nfd::BIT_LOCAL_FIELDS_ENABLED)) {
163 os <<
"local-fields";
Copyright (c) 2014-2015, Regents of the University of California, Arizona Board of Regents...
std::string formatDuration(DURATION d, bool isLong=false)