LLViewerThrottle Class Reference

#include <llviewerthrottle.h>

Collaboration diagram for LLViewerThrottle:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 LLViewerThrottle ()
void setMaxBandwidth (F32 kbits_per_second, BOOL from_event=FALSE)
void load ()
void save () const
void sendToSim () const
F32 getMaxBandwidth () const
F32 getCurrentBandwidth () const
void updateDynamicThrottle ()
void resetDynamicThrottle ()
LLViewerThrottleGroup getThrottleGroup (const F32 bandwidth_kbps)

Static Public Attributes

static const char * sNames [TC_EOF]

Protected Attributes

F32 mMaxBandwidth
F32 mCurrentBandwidth
LLViewerThrottleGroup mCurrent
std::vector< LLViewerThrottleGroupmPresets
LLFrameTimer mUpdateTimer
F32 mThrottleFrac

Detailed Description

Definition at line 61 of file llviewerthrottle.h.


Constructor & Destructor Documentation

LLViewerThrottle::LLViewerThrottle (  ) 

Definition at line 200 of file llviewerthrottle.cpp.

References BW_PRESET_1000, BW_PRESET_300, BW_PRESET_50, BW_PRESET_500, and mPresets.


Member Function Documentation

F32 LLViewerThrottle::getCurrentBandwidth (  )  const [inline]

Definition at line 73 of file llviewerthrottle.h.

References mCurrentBandwidth.

Referenced by LLViewerStats::updateFrameStats().

F32 LLViewerThrottle::getMaxBandwidth (  )  const [inline]

Definition at line 72 of file llviewerthrottle.h.

References mMaxBandwidth.

Referenced by idle_startup(), and LLViewerStats::updateFrameStats().

LLViewerThrottleGroup LLViewerThrottle::getThrottleGroup ( const F32  bandwidth_kbps  ) 

Definition at line 247 of file llviewerthrottle.cpp.

References count, LLViewerThrottleGroup::getTotal(), llclamp(), MAX_BANDWIDTH, MIN_BANDWIDTH, mPresets, and S32.

Referenced by resetDynamicThrottle(), and updateDynamicThrottle().

void LLViewerThrottle::load (  ) 

Definition at line 227 of file llviewerthrottle.cpp.

References LLViewerThrottleGroup::dump(), LLControlGroup::getF32(), gSavedSettings, mCurrent, mMaxBandwidth, and resetDynamicThrottle().

Referenced by idle_startup(), and setMaxBandwidth().

void LLViewerThrottle::resetDynamicThrottle (  ) 

Definition at line 294 of file llviewerthrottle.cpp.

References f, getThrottleGroup(), MAX_FRACTIONAL, mCurrent, mCurrentBandwidth, mMaxBandwidth, and mThrottleFrac.

Referenced by load().

void LLViewerThrottle::save (  )  const

Definition at line 235 of file llviewerthrottle.cpp.

References gSavedSettings, mMaxBandwidth, and LLControlGroup::setF32().

void LLViewerThrottle::sendToSim (  )  const

Definition at line 241 of file llviewerthrottle.cpp.

References mCurrent, and LLViewerThrottleGroup::sendToSim().

Referenced by process_agent_movement_complete(), and setMaxBandwidth().

void LLViewerThrottle::setMaxBandwidth ( F32  kbits_per_second,
BOOL  from_event = FALSE 
)

Definition at line 213 of file llviewerthrottle.cpp.

References gAgent, LLAgent::getRegion(), gSavedSettings, gViewerThrottle, load(), sendToSim(), and LLControlGroup::setF32().

Referenced by LLBPSListener::handleEvent(), LLBandwidthListener::handleEvent(), and idle_startup().

void LLViewerThrottle::updateDynamicThrottle (  ) 

Definition at line 302 of file llviewerthrottle.cpp.

References DYNAMIC_UPDATE_DURATION, EASE_THROTTLE_THRESHOLD, f, LLFrameTimer::getElapsedTimeF32(), LLStat::getMean(), getThrottleGroup(), gViewerStats, llendl, llinfos, llmax(), llmin(), MAX_BANDWIDTH, MAX_FRACTIONAL, mCurrent, mCurrentBandwidth, MIN_BANDWIDTH, MIN_FRACTIONAL, mMaxBandwidth, LLViewerStats::mPacketsLostPercentStat, mThrottleFrac, mUpdateTimer, LLFrameTimer::reset(), LLViewerThrottleGroup::sendToSim(), STEP_FRACTIONAL, and TIGHTEN_THROTTLE_THRESHOLD.

Referenced by idle_network().


Member Data Documentation

LLViewerThrottleGroup LLViewerThrottle::mCurrent [protected]

Definition at line 85 of file llviewerthrottle.h.

Referenced by load(), resetDynamicThrottle(), sendToSim(), and updateDynamicThrottle().

F32 LLViewerThrottle::mCurrentBandwidth [protected]

Definition at line 83 of file llviewerthrottle.h.

Referenced by getCurrentBandwidth(), resetDynamicThrottle(), and updateDynamicThrottle().

F32 LLViewerThrottle::mMaxBandwidth [protected]

Definition at line 82 of file llviewerthrottle.h.

Referenced by getMaxBandwidth(), load(), resetDynamicThrottle(), save(), and updateDynamicThrottle().

std::vector<LLViewerThrottleGroup> LLViewerThrottle::mPresets [protected]

Definition at line 87 of file llviewerthrottle.h.

Referenced by getThrottleGroup(), and LLViewerThrottle().

F32 LLViewerThrottle::mThrottleFrac [protected]

Definition at line 90 of file llviewerthrottle.h.

Referenced by resetDynamicThrottle(), and updateDynamicThrottle().

LLFrameTimer LLViewerThrottle::mUpdateTimer [protected]

Definition at line 89 of file llviewerthrottle.h.

Referenced by updateDynamicThrottle().

const char * LLViewerThrottle::sNames [static]

Initial value:

 {
                                                        "Resend",
                                                        "Land",
                                                        "Wind",
                                                        "Cloud",
                                                        "Task",
                                                        "Texture",
                                                        "Asset"
                                                        }

Definition at line 80 of file llviewerthrottle.h.

Referenced by LLViewerThrottleGroup::dump().


The documentation for this class was generated from the following files:
Generated on Thu Jul 1 06:11:59 2010 for Second Life Viewer by  doxygen 1.4.7