OpenSim
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Public Member Functions | Protected Attributes | Properties | List of all members
OpenSim.Region.ClientStack.LindenUDP.AdaptiveTokenBucket Class Reference
Inheritance diagram for OpenSim.Region.ClientStack.LindenUDP.AdaptiveTokenBucket:
Inheritance graph
[legend]
Collaboration diagram for OpenSim.Region.ClientStack.LindenUDP.AdaptiveTokenBucket:
Collaboration graph
[legend]

Public Member Functions

 AdaptiveTokenBucket (TokenBucket parent, float maxDripRate, float maxBurst, bool enabled)
 
void ExpirePackets (Int32 count)
 Reliable packets sent to the client for which we never received an ack adjust the drip rate down.

Parameters
packetsNumber of packets that expired without successful delivery
More...
 
void AcknowledgePackets (Int32 count)
 
- Public Member Functions inherited from OpenSim.Region.ClientStack.LindenUDP.TokenBucket
 TokenBucket (TokenBucket parent, float dripRate, float MaxBurst)
 Default constructor More...
 
void RegisterRequest (TokenBucket child, float request)
 Register drip rate requested by a child of this throttle. Pass the changes up the hierarchy. More...
 
void UnregisterRequest (TokenBucket child)
 Remove the rate requested by a child of this throttle. Pass the changes up the hierarchy. More...
 
bool RemoveTokens (int amount)
 Remove a given number of tokens from the bucket More...
 
bool CheckTokens (int amount)
 
int GetCatBytesCanSend (int timeMS)
 

Protected Attributes

const float m_minimumFlow = 50000
 The minimum rate for flow control. Minimum drip rate is one packet per second. More...
 
float m_maxDripRate = 0
 
- Protected Attributes inherited from OpenSim.Region.ClientStack.LindenUDP.TokenBucket
const float m_timeScale = 1e-3f
 
const float m_quantumsPerBurst = 5
 This is the number of m_minimumDripRate bytes allowed in a burst roughtly, with this settings, the maximum time system will take to recheck a bucket in ms More...
 
const float m_minimumDripRate = 1500
 
Int32 m_lastDrip
 Time of the last drip, in system ticks More...
 
float m_tokenCount
 The number of bytes that can be sent at this moment. This is the current number of tokens in the bucket More...
 
Dictionary< TokenBucket, float > m_children = new Dictionary<TokenBucket, float>()
 Map of children buckets and their requested maximum burst rate More...
 
TokenBucket m_parent
 The parent bucket of this bucket, or null if this bucket has no parent. The parent bucket will limit the aggregate bandwidth of all of its children buckets More...
 
float m_burst
 This is the maximum number of tokens that can accumulate in the bucket at any one time. This also sets the total request for leaf nodes More...
 
float m_dripRate
 The requested drip rate for this particular bucket. More...
 
float m_totalDripRequest
 The current total of the requested maximum burst rates of children buckets. More...
 

Properties

bool AdaptiveEnabled [get, set]
 
override float MaxDripRate [get, set]
 
virtual float AdjustedDripRate [get, set]
 
- Properties inherited from OpenSim.Region.ClientStack.LindenUDP.TokenBucket
TokenBucket Parent [get, set]
 
virtual float MaxDripRate [get, set]
 
float RequestedBurst [get, set]
 
float Burst [get]
 
virtual float RequestedDripRate [get, set]
 
virtual float DripRate [get]
 
float TotalDripRequest [get, set]
 

Additional Inherited Members

- Protected Member Functions inherited from OpenSim.Region.ClientStack.LindenUDP.TokenBucket
float DripRateModifier ()
 Compute a modifier for the MaxBurst rate. This is 1.0, meaning no modification if the requested bandwidth is less than the max burst bandwidth all the way to the root of the throttle hierarchy. However, if any of the parents is over-booked, then the modifier will be less than 1. More...
 
float BurstModifier ()
 
void Drip ()
 Add tokens to the bucket over time. The number of tokens added each call depends on the length of time that has passed since the last call to Drip More...
 

Detailed Description

Definition at line 331 of file TokenBucket.cs.

Constructor & Destructor Documentation

OpenSim.Region.ClientStack.LindenUDP.AdaptiveTokenBucket.AdaptiveTokenBucket ( TokenBucket  parent,
float  maxDripRate,
float  maxBurst,
bool  enabled 
)
inline

Definition at line 380 of file TokenBucket.cs.

Member Function Documentation

void OpenSim.Region.ClientStack.LindenUDP.AdaptiveTokenBucket.AcknowledgePackets ( Int32  count)
inline

Definition at line 407 of file TokenBucket.cs.

void OpenSim.Region.ClientStack.LindenUDP.AdaptiveTokenBucket.ExpirePackets ( Int32  count)
inline

Reliable packets sent to the client for which we never received an ack adjust the drip rate down.

Parameters
packetsNumber of packets that expired without successful delivery

Definition at line 397 of file TokenBucket.cs.

Member Data Documentation

float OpenSim.Region.ClientStack.LindenUDP.AdaptiveTokenBucket.m_maxDripRate = 0
protected

Definition at line 349 of file TokenBucket.cs.

const float OpenSim.Region.ClientStack.LindenUDP.AdaptiveTokenBucket.m_minimumFlow = 50000
protected

The minimum rate for flow control. Minimum drip rate is one packet per second.

Definition at line 342 of file TokenBucket.cs.

Property Documentation

bool OpenSim.Region.ClientStack.LindenUDP.AdaptiveTokenBucket.AdaptiveEnabled
getset

Definition at line 335 of file TokenBucket.cs.

virtual float OpenSim.Region.ClientStack.LindenUDP.AdaptiveTokenBucket.AdjustedDripRate
getset

Definition at line 365 of file TokenBucket.cs.

override float OpenSim.Region.ClientStack.LindenUDP.AdaptiveTokenBucket.MaxDripRate
getset

Definition at line 351 of file TokenBucket.cs.


The documentation for this class was generated from the following file: