OpenSim
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Public Member Functions | Static Public Member Functions | Properties | List of all members
OpenSim.Tests.Common.SceneHelpers Class Reference

Helpers for setting up scenes. More...

Public Member Functions

 SceneHelpers ()
 
 SceneHelpers (CoreAssetCache cache)
 
TestScene SetupScene ()
 Set up a test scene More...
 
TestScene SetupScene (string name, UUID id, uint x, uint y)
 
TestScene SetupScene (string name, UUID id, uint x, uint y, IConfigSource configSource)
 
TestScene SetupScene (string name, UUID id, uint x, uint y, uint sizeX, uint sizeY, IConfigSource configSource)
 Set up a scene. More...
 

Static Public Member Functions

static void SetupSceneModules (Scene scene, params object[] modules)
 Setup modules for a scene using their default settings. More...
 
static void SetupSceneModules (Scene scene, IConfigSource config, params object[] modules)
 Setup modules for a scene. More...
 
static void SetupSceneModules (Scene[] scenes, params object[] modules)
 Setup modules for a scene using their default settings. More...
 
static void SetupSceneModules (Scene[] scenes, IConfigSource config, params object[] modules)
 Setup modules for scenes. More...
 
static AgentCircuitData GenerateAgentData (UUID agentId)
 Generate some standard agent connection data. More...
 
static AgentCircuitData GenerateAgentData (UserAccount ua)
 Generate some standard agent connection data. More...
 
static ScenePresence AddScenePresence (Scene scene, UUID agentId)
 Add a root agent where the details of the agent connection (apart from the id) are unimportant for the test More...
 
static ScenePresence AddScenePresence (Scene scene, UserAccount ua)
 Add a root agent. More...
 
static ScenePresence AddScenePresence (Scene scene, AgentCircuitData agentData)
 Add a root agent. More...
 
static ScenePresence AddScenePresence (Scene scene, IClientAPI client, AgentCircuitData agentData)
 Add a root agent. More...
 
static ScenePresence AddChildScenePresence (Scene scene, UUID agentId)
 
static ScenePresence AddChildScenePresence (Scene scene, AgentCircuitData acd)
 
static SceneObjectGroup AddSceneObject (Scene scene)
 Add a test object More...
 
static SceneObjectGroup AddSceneObject (Scene scene, string name, UUID ownerId)
 Add a test object More...
 
static SceneObjectGroup AddSceneObject (Scene scene, int parts, UUID ownerId, string partNamePrefix, int uuidTail)
 Add a test object More...
 
static SceneObjectPart CreateSceneObjectPart (string name, UUID id, UUID ownerId)
 Create a scene object part. More...
 
static SceneObjectGroup CreateSceneObject (int parts, UUID ownerId)
 Create a scene object but do not add it to the scene. More...
 
static SceneObjectGroup CreateSceneObject (int parts, UUID ownerId, int uuidTail)
 Create a scene object but do not add it to the scene. More...
 
static SceneObjectGroup CreateSceneObject (int parts, UUID ownerId, string partNamePrefix, int uuidTail)
 Create a scene object but do not add it to the scene. More...
 

Properties

SceneManager SceneManager [get, set]
 We need a scene manager so that test clients can retrieve a scene when performing teleport tests. More...
 
ISimulationDataService SimDataService [get, set]
 

Detailed Description

Helpers for setting up scenes.

Definition at line 60 of file SceneHelpers.cs.

Constructor & Destructor Documentation

OpenSim.Tests.Common.SceneHelpers.SceneHelpers ( )
inline

Definition at line 83 of file SceneHelpers.cs.

OpenSim.Tests.Common.SceneHelpers.SceneHelpers ( CoreAssetCache  cache)
inline

Definition at line 85 of file SceneHelpers.cs.

Member Function Documentation

static ScenePresence OpenSim.Tests.Common.SceneHelpers.AddChildScenePresence ( Scene  scene,
UUID  agentId 
)
inlinestatic

Definition at line 588 of file SceneHelpers.cs.

Here is the caller graph for this function:

static ScenePresence OpenSim.Tests.Common.SceneHelpers.AddChildScenePresence ( Scene  scene,
AgentCircuitData  acd 
)
inlinestatic

Definition at line 593 of file SceneHelpers.cs.

static SceneObjectGroup OpenSim.Tests.Common.SceneHelpers.AddSceneObject ( Scene  scene)
inlinestatic

Add a test object

Parameters
scene
Returns

Definition at line 607 of file SceneHelpers.cs.

static SceneObjectGroup OpenSim.Tests.Common.SceneHelpers.AddSceneObject ( Scene  scene,
string  name,
UUID  ownerId 
)
inlinestatic

Add a test object

Parameters
scene
name
ownerId
Returns

Definition at line 619 of file SceneHelpers.cs.

static SceneObjectGroup OpenSim.Tests.Common.SceneHelpers.AddSceneObject ( Scene  scene,
int  parts,
UUID  ownerId,
string  partNamePrefix,
int  uuidTail 
)
inlinestatic

Add a test object

Parameters
scene
partsThe number of parts that should be in the scene object
ownerId
partNamePrefixThe prefix to be given to part names. This will be suffixed with "Part<part no>" (e.g. mynamePart1 for the root part)
uuidTailThe hexadecimal last part of the UUID for parts created. A UUID of the form "00000000-0000-0000-0000-{0:XD12}" will be given to the root part, and incremented for each part thereafter.
Returns

Definition at line 648 of file SceneHelpers.cs.

static ScenePresence OpenSim.Tests.Common.SceneHelpers.AddScenePresence ( Scene  scene,
UUID  agentId 
)
inlinestatic

Add a root agent where the details of the agent connection (apart from the id) are unimportant for the test

XXX: Use the version of this method that takes the UserAccount structure wherever possible - this will make the agent circuit data (e.g. first, lastname) consistent with the user account data.

Parameters
scene
agentId
Returns

Definition at line 488 of file SceneHelpers.cs.

Here is the caller graph for this function:

static ScenePresence OpenSim.Tests.Common.SceneHelpers.AddScenePresence ( Scene  scene,
UserAccount  ua 
)
inlinestatic

Add a root agent.

Parameters
scene
ua
Returns

Definition at line 499 of file SceneHelpers.cs.

static ScenePresence OpenSim.Tests.Common.SceneHelpers.AddScenePresence ( Scene  scene,
AgentCircuitData  agentData 
)
inlinestatic

Add a root agent.

This function

1) Tells the scene that an agent is coming. Normally, the login service (local if standalone, from the userserver if grid) would give initial login data back to the client and separately tell the scene that the agent was coming.

2) Connects the agent with the scene

This function performs actions equivalent with notifying the scene that an agent is coming and then actually connecting the agent to the scene. The one step missed out is the very first

Parameters
scene
agentData
Returns

Definition at line 522 of file SceneHelpers.cs.

static ScenePresence OpenSim.Tests.Common.SceneHelpers.AddScenePresence ( Scene  scene,
IClientAPI  client,
AgentCircuitData  agentData 
)
inlinestatic

Add a root agent.

This function

1) Tells the scene that an agent is coming. Normally, the login service (local if standalone, from the userserver if grid) would give initial login data back to the client and separately tell the scene that the agent was coming.

2) Connects the agent with the scene

This function performs actions equivalent with notifying the scene that an agent is coming and then actually connecting the agent to the scene. The one step missed out is the very first

Parameters
scene
agentData
Returns

Definition at line 545 of file SceneHelpers.cs.

Here is the call graph for this function:

static SceneObjectGroup OpenSim.Tests.Common.SceneHelpers.CreateSceneObject ( int  parts,
UUID  ownerId 
)
inlinestatic

Create a scene object but do not add it to the scene.

UUID always starts at 00000000-0000-0000-0000-000000000001. For some purposes, (e.g. serializing direct to another object's inventory) we do not need a scene unique ID. So it would be better to add the UUID when we actually add an object to a scene rather than on creation.

Parameters
partsThe number of parts that should be in the scene object
ownerId
Returns

Definition at line 682 of file SceneHelpers.cs.

static SceneObjectGroup OpenSim.Tests.Common.SceneHelpers.CreateSceneObject ( int  parts,
UUID  ownerId,
int  uuidTail 
)
inlinestatic

Create a scene object but do not add it to the scene.

Parameters
partsThe number of parts that should be in the scene object
ownerId
uuidTailThe hexadecimal last part of the UUID for parts created. A UUID of the form "00000000-0000-0000-0000-{0:XD12}" will be given to the root part, and incremented for each part thereafter.
Returns

Definition at line 697 of file SceneHelpers.cs.

static SceneObjectGroup OpenSim.Tests.Common.SceneHelpers.CreateSceneObject ( int  parts,
UUID  ownerId,
string  partNamePrefix,
int  uuidTail 
)
inlinestatic

Create a scene object but do not add it to the scene.

Parameters
partsThe number of parts that should be in the scene object
ownerId
partNamePrefixThe prefix to be given to part names. This will be suffixed with "Part<part no>" (e.g. mynamePart1 for the root part)
uuidTailThe hexadecimal last part of the UUID for parts created. A UUID of the form "00000000-0000-0000-0000-{0:XD12}" will be given to the root part, and incremented for each part thereafter.
Returns

Definition at line 718 of file SceneHelpers.cs.

static SceneObjectPart OpenSim.Tests.Common.SceneHelpers.CreateSceneObjectPart ( string  name,
UUID  id,
UUID  ownerId 
)
inlinestatic

Create a scene object part.

Parameters
name
id
ownerId
Returns

Definition at line 664 of file SceneHelpers.cs.

static AgentCircuitData OpenSim.Tests.Common.SceneHelpers.GenerateAgentData ( UUID  agentId)
inlinestatic

Generate some standard agent connection data.

Parameters
agentId
Returns

Definition at line 431 of file SceneHelpers.cs.

Here is the caller graph for this function:

static AgentCircuitData OpenSim.Tests.Common.SceneHelpers.GenerateAgentData ( UserAccount  ua)
inlinestatic

Generate some standard agent connection data.

Parameters
agentId
Returns

Definition at line 448 of file SceneHelpers.cs.

TestScene OpenSim.Tests.Common.SceneHelpers.SetupScene ( )
inline

Set up a test scene

Automatically starts services, as would the normal runtime.

Returns

Definition at line 116 of file SceneHelpers.cs.

TestScene OpenSim.Tests.Common.SceneHelpers.SetupScene ( string  name,
UUID  id,
uint  x,
uint  y 
)
inline

Definition at line 121 of file SceneHelpers.cs.

TestScene OpenSim.Tests.Common.SceneHelpers.SetupScene ( string  name,
UUID  id,
uint  x,
uint  y,
IConfigSource  configSource 
)
inline

Definition at line 126 of file SceneHelpers.cs.

TestScene OpenSim.Tests.Common.SceneHelpers.SetupScene ( string  name,
UUID  id,
uint  x,
uint  y,
uint  sizeX,
uint  sizeY,
IConfigSource  configSource 
)
inline

Set up a scene.

Parameters
nameName of the region
idID of the region
xX co-ordinate of the region
yY co-ordinate of the region
sizeXX size of scene
sizeYY size of scene
configSource
Returns

Definition at line 142 of file SceneHelpers.cs.

static void OpenSim.Tests.Common.SceneHelpers.SetupSceneModules ( Scene  scene,
params object[]  modules 
)
inlinestatic

Setup modules for a scene using their default settings.

Parameters
scene
modules

Definition at line 351 of file SceneHelpers.cs.

static void OpenSim.Tests.Common.SceneHelpers.SetupSceneModules ( Scene  scene,
IConfigSource  config,
params object[]  modules 
)
inlinestatic

Setup modules for a scene.

If called directly, then all the modules must be shared modules.

Parameters
scenes
config
modules

Definition at line 365 of file SceneHelpers.cs.

static void OpenSim.Tests.Common.SceneHelpers.SetupSceneModules ( Scene[]  scenes,
params object[]  modules 
)
inlinestatic

Setup modules for a scene using their default settings.

Parameters
scenes
modules

Definition at line 375 of file SceneHelpers.cs.

static void OpenSim.Tests.Common.SceneHelpers.SetupSceneModules ( Scene[]  scenes,
IConfigSource  config,
params object[]  modules 
)
inlinestatic

Setup modules for scenes.

If called directly, then all the modules must be shared modules.

We are emulating here the normal calls made to setup region modules (Initialise(), PostInitialise(), AddRegion, RegionLoaded()). TODO: Need to reuse normal runtime module code.

Parameters
scenes
config
modules

Definition at line 393 of file SceneHelpers.cs.

Property Documentation

SceneManager OpenSim.Tests.Common.SceneHelpers.SceneManager
getset

We need a scene manager so that test clients can retrieve a scene when performing teleport tests.

Definition at line 65 of file SceneHelpers.cs.

ISimulationDataService OpenSim.Tests.Common.SceneHelpers.SimDataService
getset

Definition at line 67 of file SceneHelpers.cs.


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