aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/SimStats.cs
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-10-06 19:52:54 +0000
committerJustin Clarke Casey2008-10-06 19:52:54 +0000
commitcb7a9eaa09fba301ba6b6838cb9e3cedfc29a32a (patch)
treef4f8c4f3b849f35e4a4e56d05740ad19651d4a71 /OpenSim/Framework/SimStats.cs
parentcleaning up OSHttpRequest removing old Http stuff. also adding test (diff)
downloadopensim-SC_OLD-cb7a9eaa09fba301ba6b6838cb9e3cedfc29a32a.zip
opensim-SC_OLD-cb7a9eaa09fba301ba6b6838cb9e3cedfc29a32a.tar.gz
opensim-SC_OLD-cb7a9eaa09fba301ba6b6838cb9e3cedfc29a32a.tar.bz2
opensim-SC_OLD-cb7a9eaa09fba301ba6b6838cb9e3cedfc29a32a.tar.xz
* Stop the sim stats reporter reusing the same SimStatsPacket for all clients
* I believe this was the cause of the remaining packet_out_of_order messages in the Linden client logs * There were race conditions where multiple clientstacks would overwrite each other's sequence numbers
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/SimStats.cs88
1 files changed, 88 insertions, 0 deletions
diff --git a/OpenSim/Framework/SimStats.cs b/OpenSim/Framework/SimStats.cs
new file mode 100644
index 0000000..c77d0d4
--- /dev/null
+++ b/OpenSim/Framework/SimStats.cs
@@ -0,0 +1,88 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSim Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using OpenMetaverse.Packets;
29
30namespace OpenSim.Framework
31{
32 /// <summary>
33 /// Enapsulate statistics for a simulator/scene.
34 ///
35 /// TODO: This looks very much like the OpenMetaverse SimStatsPacket. It should be much more generic stats
36 /// storage.
37 /// </summary>
38 public class SimStats
39 {
40 public uint RegionX
41 {
42 get { return m_regionX; }
43 }
44 private uint m_regionX;
45
46 public uint RegionY
47 {
48 get { return m_regionY; }
49 }
50 private uint m_regionY;
51
52 public SimStatsPacket.RegionBlock RegionBlock
53 {
54 get { return m_regionBlock; }
55 }
56 private SimStatsPacket.RegionBlock m_regionBlock;
57
58 public SimStatsPacket.StatBlock[] StatsBlock
59 {
60 get { return m_statsBlock; }
61 }
62 private SimStatsPacket.StatBlock[] m_statsBlock;
63
64 public uint RegionFlags
65 {
66 get { return m_regionFlags; }
67 }
68 private uint m_regionFlags;
69
70 public uint ObjectCapacity
71 {
72 get { return m_objectCapacity; }
73 }
74 private uint m_objectCapacity;
75
76 public SimStats(
77 uint regionX, uint regionY, uint regionFlags, uint objectCapacity,
78 SimStatsPacket.RegionBlock regionBlock, SimStatsPacket.StatBlock[] statsBlock)
79 {
80 m_regionX = regionX;
81 m_regionY = regionY;
82 m_regionFlags = regionFlags;
83 m_objectCapacity = objectCapacity;
84 m_regionBlock = regionBlock;
85 m_statsBlock = statsBlock;
86 }
87 }
88}