本文整理汇总了C#中OpenSim.Framework.AgentCircuitManager类的典型用法代码示例。如果您正苦于以下问题:C# AgentCircuitManager类的具体用法?C# AgentCircuitManager怎么用?C# AgentCircuitManager使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
AgentCircuitManager类属于OpenSim.Framework命名空间,在下文中一共展示了AgentCircuitManager类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: TestScene
public TestScene(
RegionInfo regInfo, AgentCircuitManager authen, PhysicsScene physicsScene,
SceneCommunicationService sceneGridService, ISimulationDataService simDataService, IEstateDataService estateDataService,
IConfigSource config, string simulatorVersion)
: base(regInfo, authen, physicsScene, sceneGridService, simDataService, estateDataService,
config, simulatorVersion)
{
}
示例2: TestScene
public TestScene(
RegionInfo regInfo, AgentCircuitManager authen,
ISimulationDataService simDataService, IEstateDataService estateDataService,
IConfigSource config, string simulatorVersion)
: base(regInfo, authen, simDataService, estateDataService,
config, simulatorVersion)
{
}
示例3: TestScene
public TestScene(
RegionInfo regInfo, AgentCircuitManager authen,
SceneCommunicationService sceneGridService, ISimulationDataService simDataService, IEstateDataService estateDataService,
ModuleLoader moduleLoader, bool dumpAssetsToFile,
IConfigSource config, string simulatorVersion)
: base(regInfo, authen, sceneGridService, simDataService, estateDataService, moduleLoader,
dumpAssetsToFile, config, simulatorVersion)
{
}
示例4: TestScene
public TestScene(
RegionInfo regInfo, AgentCircuitManager authen,
SceneCommunicationService sceneGridService, StorageManager storeManager,
ModuleLoader moduleLoader, bool dumpAssetsToFile, bool physicalPrim,
bool SeeIntoRegionFromNeighbor, IConfigSource config, string simulatorVersion)
: base(regInfo, authen, sceneGridService, storeManager, moduleLoader,
dumpAssetsToFile, physicalPrim, SeeIntoRegionFromNeighbor, config, simulatorVersion)
{
}
示例5: CreateScene
// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
public static Scene CreateScene(RegionInfo regionInfo, AgentCircuitManager circuitManager, CommunicationsManager m_commsManager,
StorageManager storageManager, ModuleLoader m_moduleLoader, ConfigSettings m_configSettings, OpenSimConfigSource m_config, string m_version)
{
HGSceneCommunicationService sceneGridService = new HGSceneCommunicationService(m_commsManager);
return
new HGScene(
regionInfo, circuitManager, m_commsManager, sceneGridService, storageManager,
m_moduleLoader, false, m_configSettings.PhysicalPrim,
m_configSettings.See_into_region_from_neighbor, m_config.Source, m_version);
}
示例6: HGScene
public HGScene(RegionInfo regInfo, AgentCircuitManager authen,
CommunicationsManager commsMan, SceneCommunicationService sceneGridService,
StorageManager storeManager,
ModuleLoader moduleLoader, bool dumpAssetsToFile, bool physicalPrim,
bool SeeIntoRegionFromNeighbor, IConfigSource config, string simulatorVersion)
: base(regInfo, authen, commsMan, sceneGridService, storeManager, moduleLoader,
dumpAssetsToFile, physicalPrim, SeeIntoRegionFromNeighbor, config, simulatorVersion)
{
m_log.Info("[HGScene]: Starting HGScene.");
m_assMapper = new HGAssetMapper(this);
EventManager.OnNewInventoryItemUploadComplete += UploadInventoryItem;
}
示例7: SetupStack
/// <summary>
/// Add a client for testing
/// </summary>
/// <param name="scene"></param>
/// <param name="testLLUDPServer"></param>
/// <param name="testPacketServer"></param>
/// <param name="acm">Agent circuit manager used in setting up the stack</param>
protected void SetupStack(
IScene scene, out TestLLUDPServer testLLUDPServer, out TestLLPacketServer testPacketServer,
out AgentCircuitManager acm)
{
IConfigSource configSource = new IniConfigSource();
ClientStackUserSettings userSettings = new ClientStackUserSettings();
testLLUDPServer = new TestLLUDPServer();
acm = new AgentCircuitManager();
uint port = 666;
testLLUDPServer.Initialise(null, ref port, 0, false, configSource, acm);
testPacketServer = new TestLLPacketServer(testLLUDPServer, userSettings);
testLLUDPServer.LocalScene = scene;
}
示例8: CreateScene
protected override Scene CreateScene(RegionInfo regionInfo, ISimulationDataService simDataService,
IEstateDataService estateDataService, AgentCircuitManager circuitManager)
{
SceneCommunicationService sceneGridService = new SceneCommunicationService();
return new Scene(
regionInfo, circuitManager, sceneGridService,
simDataService, estateDataService, m_moduleLoader, false, m_configSettings.PhysicalPrim,
m_configSettings.See_into_region_from_neighbor, m_config.Source, m_version);
}
示例9: LLUDPServer
public LLUDPServer(IPAddress listenIP, ref uint port, int proxyPortOffsetParm, bool allow_alternate_port, IConfigSource configSource, AgentCircuitManager circuitManager)
: base(listenIP, (int)port)
{
#region Environment.TickCount Measurement
// Measure the resolution of Environment.TickCount
TickCountResolution = 0f;
for (int i = 0; i < 5; i++)
{
int start = Environment.TickCount;
int now = start;
while (now == start)
now = Environment.TickCount;
TickCountResolution += (float)(now - start) * 0.2f;
}
//m_log.Info("[LLUDPSERVER]: Average Environment.TickCount resolution: " + TickCountResolution + "ms");
TickCountResolution = (float)Math.Ceiling(TickCountResolution);
#endregion Environment.TickCount Measurement
m_circuitManager = circuitManager;
int sceneThrottleBps = 0;
IConfig config = configSource.Configs["ClientStack.LindenUDP"];
if (config != null)
{
m_asyncPacketHandling = config.GetBoolean("async_packet_handling", false);
m_recvBufferSize = config.GetInt("client_socket_rcvbuf_size", 0);
sceneThrottleBps = config.GetInt("scene_throttle_max_bps", 0);
PrimUpdatesPerCallback = config.GetInt("PrimUpdatesPerCallback", 100);
TextureSendLimit = config.GetInt("TextureSendLimit", 20);
m_defaultRTO = config.GetInt("DefaultRTO", 0);
m_maxRTO = config.GetInt("MaxRTO", 0);
ClientTimeOut = config.GetInt("ClientTimeOut", 60);
m_disableFacelights = config.GetBoolean("DisableFacelights", false);
}
else
{
PrimUpdatesPerCallback = 100;
TextureSendLimit = 20;
ClientTimeOut = 60;
}
#region BinaryStats
config = configSource.Configs["Statistics.Binary"];
m_shouldCollectStats = false;
if (config != null)
{
if (config.Contains("enabled") && config.GetBoolean("enabled"))
{
if (config.Contains("collect_packet_headers"))
m_shouldCollectStats = config.GetBoolean("collect_packet_headers");
if (config.Contains("packet_headers_period_seconds"))
{
binStatsMaxFilesize = TimeSpan.FromSeconds(config.GetInt("region_stats_period_seconds"));
}
if (config.Contains("stats_dir"))
{
binStatsDir = config.GetString("stats_dir");
}
}
else
{
m_shouldCollectStats = false;
}
}
#endregion BinaryStats
m_throttle = new TokenBucket(null, sceneThrottleBps, sceneThrottleBps);
m_throttleRates = new ThrottleRates(configSource);
}
示例10: CreateScene
protected override Scene CreateScene(RegionInfo regionInfo, StorageManager storageManager,
AgentCircuitManager circuitManager)
{
bool hgrid = ConfigSource.Source.Configs["Startup"].GetBoolean("hypergrid", false);
if (hgrid)
return HGCommands.CreateScene(regionInfo, circuitManager, m_commsManager,
storageManager, m_moduleLoader, m_configSettings, m_config, m_version);
SceneCommunicationService sceneGridService = new SceneCommunicationService(m_commsManager);
return new Scene(
regionInfo, circuitManager, m_commsManager, sceneGridService,
storageManager, m_moduleLoader, false, m_configSettings.PhysicalPrim,
m_configSettings.See_into_region_from_neighbor, m_config.Source, m_version);
}
示例11: SetupScene
/// <summary>
/// Create a scene and its initial base structures.
/// </summary>
/// <param name="regionInfo"></param>
/// <param name="proxyOffset"></param>
/// <param name="configSource"></param>
/// <param name="clientServer"> </param>
/// <returns></returns>
protected Scene SetupScene(
RegionInfo regionInfo, int proxyOffset, IConfigSource configSource, out IClientNetworkServer clientServer)
{
AgentCircuitManager circuitManager = new AgentCircuitManager();
IPAddress listenIP = regionInfo.InternalEndPoint.Address;
//if (!IPAddress.TryParse(regionInfo.InternalEndPoint, out listenIP))
// listenIP = IPAddress.Parse("0.0.0.0");
uint port = (uint) regionInfo.InternalEndPoint.Port;
if (m_autoCreateClientStack)
{
clientServer
= m_clientStackManager.CreateServer(
listenIP, ref port, proxyOffset, regionInfo.m_allow_alternate_ports, configSource,
circuitManager);
}
else
{
clientServer = null;
}
regionInfo.InternalEndPoint.Port = (int) port;
Scene scene = CreateScene(regionInfo, m_storageManager, circuitManager);
if (m_autoCreateClientStack)
{
clientServer.AddScene(scene);
}
scene.LoadWorldMap();
scene.PhysicsScene = GetPhysicsScene(scene.RegionInfo.RegionName);
scene.PhysicsScene.SetTerrain(scene.Heightmap.GetFloatsSerialised());
scene.PhysicsScene.SetWaterLevel((float) regionInfo.RegionSettings.WaterHeight);
// TODO: Remove this cruft once MasterAvatar is fully deprecated
//Master Avatar Setup
UserProfileData masterAvatar;
if (scene.RegionInfo.MasterAvatarAssignedUUID == UUID.Zero)
{
masterAvatar =
m_commsManager.UserService.SetupMasterUser(scene.RegionInfo.MasterAvatarFirstName,
scene.RegionInfo.MasterAvatarLastName,
scene.RegionInfo.MasterAvatarSandboxPassword);
}
else
{
masterAvatar = m_commsManager.UserService.SetupMasterUser(scene.RegionInfo.MasterAvatarAssignedUUID);
scene.RegionInfo.MasterAvatarFirstName = masterAvatar.FirstName;
scene.RegionInfo.MasterAvatarLastName = masterAvatar.SurName;
}
if (masterAvatar == null)
{
m_log.Info("[PARCEL]: No master avatar found, using null.");
scene.RegionInfo.MasterAvatarAssignedUUID = UUID.Zero;
}
else
{
m_log.InfoFormat("[PARCEL]: Found master avatar {0} {1} [" + masterAvatar.ID.ToString() + "]",
scene.RegionInfo.MasterAvatarFirstName, scene.RegionInfo.MasterAvatarLastName);
scene.RegionInfo.MasterAvatarAssignedUUID = masterAvatar.ID;
}
return scene;
}
示例12: Scene
public Scene(RegionInfo regInfo, AgentCircuitManager authen,
CommunicationsManager commsMan, SceneCommunicationService sceneGridService,
StorageManager storeManager,
ModuleLoader moduleLoader, bool dumpAssetsToFile, bool physicalPrim,
bool SeeIntoRegionFromNeighbor, IConfigSource config, string simulatorVersion)
{
m_config = config;
Random random = new Random();
m_lastAllocatedLocalId = (uint)(random.NextDouble() * (double)(uint.MaxValue/2))+(uint)(uint.MaxValue/4);
m_moduleLoader = moduleLoader;
m_authenticateHandler = authen;
CommsManager = commsMan;
m_sceneGridService = sceneGridService;
m_storageManager = storeManager;
m_regInfo = regInfo;
m_regionHandle = m_regInfo.RegionHandle;
m_regionName = m_regInfo.RegionName;
m_datastore = m_regInfo.DataStore;
m_physicalPrim = physicalPrim;
m_seeIntoRegionFromNeighbor = SeeIntoRegionFromNeighbor;
m_eventManager = new EventManager();
m_permissions = new ScenePermissions(this);
m_asyncSceneObjectDeleter = new AsyncSceneObjectGroupDeleter(this);
m_asyncSceneObjectDeleter.Enabled = true;
// Load region settings
m_regInfo.RegionSettings = m_storageManager.DataStore.LoadRegionSettings(m_regInfo.RegionID);
if (m_storageManager.EstateDataStore != null)
{
m_regInfo.EstateSettings = m_storageManager.EstateDataStore.LoadEstateSettings(m_regInfo.RegionID);
}
//Bind Storage Manager functions to some land manager functions for this scene
EventManager.OnLandObjectAdded +=
new EventManager.LandObjectAdded(m_storageManager.DataStore.StoreLandObject);
EventManager.OnLandObjectRemoved +=
new EventManager.LandObjectRemoved(m_storageManager.DataStore.RemoveLandObject);
m_sceneGraph = new SceneGraph(this, m_regInfo);
// If the scene graph has an Unrecoverable error, restart this sim.
// Currently the only thing that causes it to happen is two kinds of specific
// Physics based crashes.
//
// Out of memory
// Operating system has killed the plugin
m_sceneGraph.UnRecoverableError += RestartNow;
RegisterDefaultSceneEvents();
DumpAssetsToFile = dumpAssetsToFile;
m_scripts_enabled = !RegionInfo.RegionSettings.DisableScripts;
m_physics_enabled = !RegionInfo.RegionSettings.DisablePhysics;
StatsReporter = new SimStatsReporter(this);
StatsReporter.OnSendStatsResult += SendSimStatsPackets;
StatsReporter.OnStatsIncorrect += m_sceneGraph.RecalculateStats;
StatsReporter.SetObjectCapacity(objectCapacity);
m_simulatorVersion = simulatorVersion
+ " (OS " + Util.GetOperatingSystemInformation() + ")"
+ " ChilTasks:" + m_seeIntoRegionFromNeighbor.ToString()
+ " PhysPrim:" + m_physicalPrim.ToString();
try
{
// Region config overrides global config
//
IConfig startupConfig = m_config.Configs["Startup"];
//Animation states
m_useFlySlow = startupConfig.GetBoolean("enableflyslow", false);
// TODO: Change default to true once the feature is supported
m_usePreJump = startupConfig.GetBoolean("enableprejump", false);
m_maxNonphys = startupConfig.GetFloat("NonPhysicalPrimMax", m_maxNonphys);
if (RegionInfo.NonphysPrimMax > 0)
{
m_maxNonphys = RegionInfo.NonphysPrimMax;
}
m_maxPhys = startupConfig.GetFloat("PhysicalPrimMax", m_maxPhys);
if (RegionInfo.PhysPrimMax > 0)
{
m_maxPhys = RegionInfo.PhysPrimMax;
}
// Here, if clamping is requested in either global or
// local config, it will be used
//
m_clampPrimSize = startupConfig.GetBoolean("ClampPrimSize", m_clampPrimSize);
if (RegionInfo.ClampPrimSize)
//.........这里部分代码省略.........
示例13: Scene
public Scene(RegionInfo regInfo, AgentCircuitManager authen,
ISimulationDataService simDataService, IEstateDataService estateDataService,
IConfigSource config, string simulatorVersion)
: this(regInfo)
{
m_config = config;
FrameTime = 0.0908f;
FrameTimeWarnPercent = 60;
FrameTimeCritPercent = 40;
Normalized55FPS = true;
MinMaintenanceTime = 1;
SeeIntoRegion = true;
Random random = new Random();
m_lastAllocatedLocalId = (uint)(random.NextDouble() * (double)(uint.MaxValue / 2)) + (uint)(uint.MaxValue / 4);
m_authenticateHandler = authen;
m_sceneGridService = new SceneCommunicationService();
m_SimulationDataService = simDataService;
m_EstateDataService = estateDataService;
m_lastIncoming = 0;
m_lastOutgoing = 0;
m_asyncSceneObjectDeleter = new AsyncSceneObjectGroupDeleter(this);
m_asyncSceneObjectDeleter.Enabled = true;
m_asyncInventorySender = new AsyncInventorySender(this);
#region Region Settings
// Load region settings
// LoadRegionSettings creates new region settings in persistence if they don't already exist for this region.
// However, in this case, the default textures are not set in memory properly, so we need to do it here and
// resave.
// FIXME: It shouldn't be up to the database plugins to create this data - we should do it when a new
// region is set up and avoid these gyrations.
RegionSettings rs = simDataService.LoadRegionSettings(RegionInfo.RegionID);
m_extraSettings = simDataService.GetExtra(RegionInfo.RegionID);
bool updatedTerrainTextures = false;
if (rs.TerrainTexture1 == UUID.Zero)
{
rs.TerrainTexture1 = RegionSettings.DEFAULT_TERRAIN_TEXTURE_1;
updatedTerrainTextures = true;
}
if (rs.TerrainTexture2 == UUID.Zero)
{
rs.TerrainTexture2 = RegionSettings.DEFAULT_TERRAIN_TEXTURE_2;
updatedTerrainTextures = true;
}
if (rs.TerrainTexture3 == UUID.Zero)
{
rs.TerrainTexture3 = RegionSettings.DEFAULT_TERRAIN_TEXTURE_3;
updatedTerrainTextures = true;
}
if (rs.TerrainTexture4 == UUID.Zero)
{
rs.TerrainTexture4 = RegionSettings.DEFAULT_TERRAIN_TEXTURE_4;
updatedTerrainTextures = true;
}
if (updatedTerrainTextures)
rs.Save();
RegionInfo.RegionSettings = rs;
if (estateDataService != null)
RegionInfo.EstateSettings = estateDataService.LoadEstateSettings(RegionInfo.RegionID, false);
#endregion Region Settings
//Bind Storage Manager functions to some land manager functions for this scene
EventManager.OnLandObjectAdded +=
new EventManager.LandObjectAdded(simDataService.StoreLandObject);
EventManager.OnLandObjectRemoved +=
new EventManager.LandObjectRemoved(simDataService.RemoveLandObject);
RegisterDefaultSceneEvents();
// XXX: Don't set the public property since we don't want to activate here. This needs to be handled
// better in the future.
m_scripts_enabled = !RegionInfo.RegionSettings.DisableScripts;
PhysicsEnabled = !RegionInfo.RegionSettings.DisablePhysics;
m_simulatorVersion = simulatorVersion + " (" + Util.GetRuntimeInformation() + ")";
#region Region Config
// Region config overrides global config
//
if (m_config.Configs["Startup"] != null)
{
IConfig startupConfig = m_config.Configs["Startup"];
StartDisabled = startupConfig.GetBoolean("StartDisabled", false);
//.........这里部分代码省略.........
示例14: CreateServer
/// <summary>
/// Create a server that can set up sessions for virtual world client <-> server communications
/// </summary>
/// <param name="_listenIP"></param>
/// <param name="port"></param>
/// <param name="proxyPortOffset"></param>
/// <param name="allow_alternate_port"></param>
/// <param name="assetCache"></param>
/// <param name="authenticateClass"></param>
/// <returns></returns>
public IClientNetworkServer CreateServer(
IPAddress _listenIP, ref uint port, int proxyPortOffset, bool allow_alternate_port,
AgentCircuitManager authenticateClass)
{
return CreateServer(
_listenIP, ref port, proxyPortOffset, allow_alternate_port, null, authenticateClass);
}
示例15: CreateScene
protected abstract Scene CreateScene(RegionInfo regionInfo, ISimulationDataService simDataService, IEstateDataService estateDataService, AgentCircuitManager circuitManager);