本文整理汇总了C++中LLCircuitData::getPacketsIn方法的典型用法代码示例。如果您正苦于以下问题:C++ LLCircuitData::getPacketsIn方法的具体用法?C++ LLCircuitData::getPacketsIn怎么用?C++ LLCircuitData::getPacketsIn使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLCircuitData
的用法示例。
在下文中一共展示了LLCircuitData::getPacketsIn方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: updateNetStats
void LLViewerRegion::updateNetStats()
{
F32 dt = mLastNetUpdate.getElapsedTimeAndResetF32();
LLCircuitData *cdp = LLMessageSystem::getInstance()->mCircuitInfo.findCircuit( m_host );
if (!cdp)
{
mAlive = false;
return;
}
mAlive = true;
mDeltaTime = dt;
mLastPacketsIn = mPacketsIn;
mLastBitsIn = mBitsIn;
mLastPacketsOut = mPacketsOut;
mLastPacketsLost = mPacketsLost;
mPacketsIn = cdp->getPacketsIn();
mBitsIn = 8 * cdp->getBytesIn();
mPacketsOut = cdp->getPacketsOut();
mPacketsLost = cdp->getPacketsLost();
mPingDelay = cdp->getPingDelay();
mBitStat.addValue(mBitsIn - mLastBitsIn);
mPacketsStat.addValue(mPacketsIn - mLastPacketsIn);
mPacketsLostStat.addValue(mPacketsLost);
}
示例2: refreshNetInfo
void LLFloaterMessageLog::refreshNetInfo(BOOL force)
{
if(mInfoPaneMode != IPANE_NET) return;
LLScrollListCtrl* scrollp = getChild<LLScrollListCtrl>("net_list");
LLScrollListItem* selected_itemp = scrollp->getFirstSelected();
if(selected_itemp)
{
LLTextEditor* net_info = getChild<LLTextEditor>("net_info");
if(!force && (net_info->hasSelection() || net_info->hasFocus())) return;
LLNetListItem* itemp = findNetListItem(selected_itemp->getUUID());
if(itemp)
{
std::string info(llformat("%s, %d\n--------------------------------\n\n", itemp->mName.c_str(), itemp->mHandle));
if(itemp->mCircuitData)
{
LLCircuitData* cdp = itemp->mCircuitData;
info.append("Circuit\n--------------------------------\n");
info.append(llformat(" * Host: %s\n", cdp->getHost().getString().c_str()));
S32 seconds = (S32)cdp->getAgeInSeconds();
S32 minutes = seconds / 60;
seconds = seconds % 60;
S32 hours = minutes / 60;
minutes = minutes % 60;
info.append(llformat(" * Age: %dh %dm %ds\n", hours, minutes, seconds));
info.append(llformat(" * Alive: %s\n", cdp->isAlive() ? "yes" : "no"));
info.append(llformat(" * Blocked: %s\n", cdp->isBlocked() ? "yes" : "no"));
info.append(llformat(" * Allow timeout: %s\n", cdp->getAllowTimeout() ? "yes" : "no"));
info.append(llformat(" * Trusted: %s\n", cdp->getTrusted() ? "yes" : "no"));
info.append(llformat(" * Ping delay: %d\n", cdp->getPingDelay()));
info.append(llformat(" * Packets out: %d\n", cdp->getPacketsOut()));
info.append(llformat(" * Bytes out: %d\n", cdp->getBytesOut()));
info.append(llformat(" * Packets in: %d\n", cdp->getPacketsIn()));
info.append(llformat(" * Bytes in: %d\n", cdp->getBytesIn()));
info.append(llformat(" * Endpoint ID: %s\n", cdp->getLocalEndPointID().asString().c_str()));
info.append(llformat(" * Remote ID: %s\n", cdp->getRemoteID().asString().c_str()));
info.append(llformat(" * Remote session ID: %s\n", cdp->getRemoteSessionID().asString().c_str()));
info.append("\n");
}
childSetText("net_info", info);
}
else childSetText("net_info", std::string(""));
}
else childSetText("net_info", std::string(""));
}