From 9ad17de8e3bdffbb2cc19beb85d8a9827e2142ca Mon Sep 17 00:00:00 2001 From: Jim Radford Date: Sun, 10 May 2009 09:05:06 +0000 Subject: [PATCH] LIBOMV-530 Updates Simulator object to include new variables included in 1.23 message template which are sent during the region handshake and include information on physical server location, the type of region (Homestead, OpenSpace, etc), CPU Class and CPU Ratio. git-svn-id: http://libopenmetaverse.googlecode.com/svn/libopenmetaverse/trunk@2738 52acb1d6-8a22-11de-b505-999d5b087335 --- OpenMetaverse/NetworkManager.cs | 9 +++++++ OpenMetaverse/Simulator.cs | 42 ++++++++++++++++++++++++++++++++- 2 files changed, 50 insertions(+), 1 deletion(-) diff --git a/OpenMetaverse/NetworkManager.cs b/OpenMetaverse/NetworkManager.cs index c847f754..d4a72aa5 100644 --- a/OpenMetaverse/NetworkManager.cs +++ b/OpenMetaverse/NetworkManager.cs @@ -1095,6 +1095,15 @@ namespace OpenMetaverse simulator.BillableFactor = handshake.RegionInfo.BillableFactor; simulator.Access = (SimAccess)handshake.RegionInfo.SimAccess; + + simulator.RegionID = handshake.RegionInfo2.RegionID; + simulator.ColoLocation = Utils.BytesToString(handshake.RegionInfo3.ColoName); + simulator.CPUClass = handshake.RegionInfo3.CPUClassID; + simulator.CPURatio = handshake.RegionInfo3.CPURatio; + simulator.ProductName = Utils.BytesToString(handshake.RegionInfo3.ProductName); + simulator.ProductSku = Utils.BytesToString(handshake.RegionInfo3.ProductSKU); + + Logger.Log("Received a region handshake for " + simulator.ToString(), Helpers.LogLevel.Info, Client); // Send a RegionHandshakeReply diff --git a/OpenMetaverse/Simulator.cs b/OpenMetaverse/Simulator.cs index e9fc5b43..4a5016bb 100644 --- a/OpenMetaverse/Simulator.cs +++ b/OpenMetaverse/Simulator.cs @@ -298,7 +298,47 @@ namespace OpenMetaverse /// connection to the simulator, calculated by the simulator itself /// and the library public SimStats Stats; - + /// The regions Unique ID + public UUID RegionID = UUID.Zero; + /// The physical data center the simulator is located + /// Known values are: + /// + /// Dallas + /// Chandler + /// SF + /// + /// + public string ColoLocation; + /// The CPU Class of the simulator + /// Most full mainland/estate sims appear to be 5, + /// Homesteads and Openspace appear to be 501 + public int CPUClass; + /// The number of regions sharing the same CPU as this one + /// "Full Sims" appear to be 1, Homesteads appear to be 4 + public int CPURatio; + /// The billing product name + /// Known values are: + /// + /// Mainland / Full Region (Sku: 023) + /// Estate / Full Region (Sku: 024) + /// Estate / Openspace (Sku: 027) + /// Estate / Homestead (Sku: 029) + /// Mainland / Homestead (Sku: 129) (Linden Owned) + /// + /// + public string ProductName; + /// The billing product SKU + /// Known values are: + /// + /// 023 Mainland / Full Region + /// 024 Estate / Full Region + /// 027 Estate / Openspace + /// 029 Estate / Homestead + /// 129 Mainland / Homestead (Linden Owned) + /// + /// + public string ProductSku; + /// Provides access to two thread-safe dictionaries containing /// avatars and primitives found in this simulator //public ObjectTracker Objects = new ObjectTracker();