OpenSim
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Public Member Functions | Properties | Events | List of all members
OpenSim.Tests.Common.MockScriptEngine Class Reference
Inheritance diagram for OpenSim.Tests.Common.MockScriptEngine:
Inheritance graph
[legend]
Collaboration diagram for OpenSim.Tests.Common.MockScriptEngine:
Collaboration graph
[legend]

Public Member Functions

void Initialise (IConfigSource source)
 This is called to initialize the region module. For shared modules, this is called exactly once, after creating the single (shared) instance. For non-shared modules, this is called once on each instance, after the instace for the region has been created. More...
 
void Close ()
 This is the inverse to Initialise. After a Close(), this instance won't be usable anymore. More...
 
void AddRegion (Scene scene)
 This is called whenever a Scene is added. For shared modules, this can happen several times. For non-shared modules, this happens exactly once, after Initialise has been called. More...
 
void RemoveRegion (Scene scene)
 This is called whenever a Scene is removed. For shared modules, this can happen several times. For non-shared modules, this happens exactly once, if the scene this instance is associated with is removed. More...
 
void RegionLoaded (Scene scene)
 This will be called once for every scene loaded. In a shared module this will be multiple times in one instance, while a nonshared module instance will only be called once. This method is called after AddRegion has been called in all modules for that scene, providing an opportunity to request another module's interface, or hook an event from another module. More...
 
string GetXMLState (UUID itemID)
 
bool SetXMLState (UUID itemID, string xml)
 
bool PostScriptEvent (UUID itemID, string name, object[] args)
 
bool PostScriptEvent (UUID itemID, EventParams evParams)
 Post an event to a single script More...
 
bool PostObjectEvent (uint localID, EventParams evParams)
 Post event to an entire prim More...
 
bool PostObjectEvent (UUID itemID, string name, object[] args)
 
void SuspendScript (UUID itemID)
 Suspends a script. More...
 
void ResumeScript (UUID itemID)
 Resumes a script. More...
 
ArrayList GetScriptErrors (UUID itemID)
 
bool HasScript (UUID itemID, out bool running)
 
bool GetScriptState (UUID itemID)
 Returns true if a script is running. More...
 
void SaveAllState ()
 
void StartProcessing ()
 Starts the processing threads. More...
 
float GetScriptExecutionTime (List< UUID > itemIDs)
 Get the execution times of all scripts in the given array if they are currently running. More...
 
Dictionary< uint, float > GetObjectScriptsExecutionTimes ()
 Get the execution times of all scripts in each object. More...
 
IScriptWorkItem QueueEventHandler (object parms)
 Queue an event for execution More...
 
DetectParams GetDetectParams (UUID item, int number)
 
void SetMinEventDelay (UUID itemID, double delay)
 
int GetStartParameter (UUID itemID)
 
void SetScriptState (UUID itemID, bool state)
 
void SetState (UUID itemID, string newState)
 
void ApiResetScript (UUID itemID)
 
void ResetScript (UUID itemID)
 
IScriptApi GetApi (UUID itemID, string name)
 
void ClearPostedEvents ()
 
void SleepScript (UUID itemID, int delay)
 
- Public Member Functions inherited from OpenSim.Region.Framework.Interfaces.IScriptModule
bool PostScriptEvent (UUID itemID, string name, Object[] args)
 Post a script event to a single script. More...
 
bool PostObjectEvent (UUID itemID, string name, Object[] args)
 

Properties

IConfigSource ConfigSource [get, set]
 
IConfig Config [get, set]
 
Dictionary< UUID, List
< EventParams > > 
PostedEvents [get, set]
 Expose posted events to tests. More...
 
string Name [get]
 
string ScriptEngineName [get]
 
Type ReplaceableInterface [get]
 
Scene World [get]
 
IScriptModule ScriptModule [get]
 
string ScriptEnginePath [get]
 
string ScriptClassName [get]
 
string ScriptBaseClassName [get]
 
string[] ScriptReferencedAssemblies [get]
 
ParameterInfo[] ScriptBaseClassParameters [get]
 
- Properties inherited from OpenSim.Region.Framework.Interfaces.IRegionModuleBase
string Name [get]
 
Type ReplaceableInterface [get]
 If this returns non-null, it is the type of an interface that this module intends to register. This will cause the loader to defer loading of this module until all other modules have been loaded. If no other module has registered the interface by then, this module will be activated, else it will remain inactive, letting the other module take over. This should return non-null ONLY in modules that are intended to be easily replaceable, e.g. stub implementations that the developer expects to be replaced by third party provided modules. More...
 
- Properties inherited from OpenSim.Region.Framework.Interfaces.IScriptModule
string ScriptEngineName [get]
 
- Properties inherited from OpenSim.Region.ScriptEngine.Interfaces.IScriptEngine
Scene World [get]
 
IScriptModule ScriptModule [get]
 
IConfig Config [get]
 
IConfigSource ConfigSource [get]
 
string ScriptEngineName [get]
 
string ScriptEnginePath [get]
 
string ScriptClassName [get]
 Return the name of the class that will be used for all running scripts. More...
 
string ScriptBaseClassName [get]
 Return the name of the base class that will be used for all running scripts. More...
 
string[] ScriptReferencedAssemblies [get]
 Assemblies that need to be referenced when compiling scripts. More...
 
ParameterInfo[] ScriptBaseClassParameters [get]
 Parameters for the generated script's constructor. More...
 

Events

Action< UUID, EventParamsPostEventHook
 A very primitive way of hooking text cose to a posed event. More...
 
ScriptRemoved OnScriptRemoved
 
ObjectRemoved OnObjectRemoved
 
- Events inherited from OpenSim.Region.Framework.Interfaces.IScriptModule
ScriptRemoved OnScriptRemoved
 Triggered when a script is removed from the script module. More...
 
ObjectRemoved OnObjectRemoved
 Triggered when an object is removed via the script module. More...
 

Detailed Description

Definition at line 42 of file MockScriptEngine.cs.

Member Function Documentation

void OpenSim.Tests.Common.MockScriptEngine.AddRegion ( Scene  scene)
inline

This is called whenever a Scene is added. For shared modules, this can happen several times. For non-shared modules, this happens exactly once, after Initialise has been called.

Parameters
sceneA Scene

Implements OpenSim.Region.Framework.Interfaces.IRegionModuleBase.

Definition at line 77 of file MockScriptEngine.cs.

void OpenSim.Tests.Common.MockScriptEngine.ApiResetScript ( UUID  itemID)
inline
void OpenSim.Tests.Common.MockScriptEngine.ClearPostedEvents ( )
inline

Definition at line 263 of file MockScriptEngine.cs.

void OpenSim.Tests.Common.MockScriptEngine.Close ( )
inline

This is the inverse to Initialise. After a Close(), this instance won't be usable anymore.

Implements OpenSim.Region.Framework.Interfaces.IRegionModuleBase.

Definition at line 73 of file MockScriptEngine.cs.

IScriptApi OpenSim.Tests.Common.MockScriptEngine.GetApi ( UUID  itemID,
string  name 
)
inline
DetectParams OpenSim.Tests.Common.MockScriptEngine.GetDetectParams ( UUID  item,
int  number 
)
inline
Dictionary<uint, float> OpenSim.Tests.Common.MockScriptEngine.GetObjectScriptsExecutionTimes ( )
inline

Get the execution times of all scripts in each object.

Returns
A dictionary where the key is the root object ID of a linkset and the value is a representative execution time in milliseconds of all scripts in that linkset.

Implements OpenSim.Region.Framework.Interfaces.IScriptModule.

Definition at line 199 of file MockScriptEngine.cs.

ArrayList OpenSim.Tests.Common.MockScriptEngine.GetScriptErrors ( UUID  itemID)
inline
float OpenSim.Tests.Common.MockScriptEngine.GetScriptExecutionTime ( List< UUID >  itemIDs)
inline

Get the execution times of all scripts in the given array if they are currently running.

Returns
A float the value is a representative execution time in milliseconds of all scripts in that Array.

Implements OpenSim.Region.Framework.Interfaces.IScriptModule.

Definition at line 194 of file MockScriptEngine.cs.

bool OpenSim.Tests.Common.MockScriptEngine.GetScriptState ( UUID  itemID)
inline

Returns true if a script is running.

Parameters
itemIDThe item ID of the script.

Implements OpenSim.Region.Framework.Interfaces.IScriptModule.

Definition at line 179 of file MockScriptEngine.cs.

int OpenSim.Tests.Common.MockScriptEngine.GetStartParameter ( UUID  itemID)
inline
string OpenSim.Tests.Common.MockScriptEngine.GetXMLState ( UUID  itemID)
inline
bool OpenSim.Tests.Common.MockScriptEngine.HasScript ( UUID  itemID,
out bool  running 
)
inline
void OpenSim.Tests.Common.MockScriptEngine.Initialise ( IConfigSource  source)
inline

This is called to initialize the region module. For shared modules, this is called exactly once, after creating the single (shared) instance. For non-shared modules, this is called once on each instance, after the instace for the region has been created.

Parameters
sourceA IConfigSource

Implements OpenSim.Region.Framework.Interfaces.IRegionModuleBase.

Definition at line 63 of file MockScriptEngine.cs.

bool OpenSim.Tests.Common.MockScriptEngine.PostObjectEvent ( uint  localID,
EventParams  parms 
)
inline

Post event to an entire prim

Implements OpenSim.Region.ScriptEngine.Interfaces.IScriptEngine.

Definition at line 141 of file MockScriptEngine.cs.

bool OpenSim.Tests.Common.MockScriptEngine.PostObjectEvent ( UUID  itemID,
string  name,
object[]  args 
)
inline

Definition at line 146 of file MockScriptEngine.cs.

bool OpenSim.Tests.Common.MockScriptEngine.PostScriptEvent ( UUID  itemID,
string  name,
object[]  args 
)
inline

Definition at line 112 of file MockScriptEngine.cs.

bool OpenSim.Tests.Common.MockScriptEngine.PostScriptEvent ( UUID  itemID,
EventParams  parms 
)
inline

Post an event to a single script

Implements OpenSim.Region.ScriptEngine.Interfaces.IScriptEngine.

Definition at line 119 of file MockScriptEngine.cs.

IScriptWorkItem OpenSim.Tests.Common.MockScriptEngine.QueueEventHandler ( object  parms)
inline

Queue an event for execution

Implements OpenSim.Region.ScriptEngine.Interfaces.IScriptEngine.

Definition at line 204 of file MockScriptEngine.cs.

void OpenSim.Tests.Common.MockScriptEngine.RegionLoaded ( Scene  scene)
inline

This will be called once for every scene loaded. In a shared module this will be multiple times in one instance, while a nonshared module instance will only be called once. This method is called after AddRegion has been called in all modules for that scene, providing an opportunity to request another module's interface, or hook an event from another module.

Parameters
sceneA Scene

Implements OpenSim.Region.Framework.Interfaces.IRegionModuleBase.

Definition at line 88 of file MockScriptEngine.cs.

void OpenSim.Tests.Common.MockScriptEngine.RemoveRegion ( Scene  scene)
inline

This is called whenever a Scene is removed. For shared modules, this can happen several times. For non-shared modules, this happens exactly once, if the scene this instance is associated with is removed.

Parameters
sceneA Scene

Implements OpenSim.Region.Framework.Interfaces.IRegionModuleBase.

Definition at line 84 of file MockScriptEngine.cs.

void OpenSim.Tests.Common.MockScriptEngine.ResetScript ( UUID  itemID)
inline
void OpenSim.Tests.Common.MockScriptEngine.ResumeScript ( UUID  itemID)
inline

Resumes a script.

Parameters
itemIDThe item ID of the script.

Implements OpenSim.Region.Framework.Interfaces.IScriptModule.

Definition at line 164 of file MockScriptEngine.cs.

void OpenSim.Tests.Common.MockScriptEngine.SaveAllState ( )
inline
void OpenSim.Tests.Common.MockScriptEngine.SetMinEventDelay ( UUID  itemID,
double  delay 
)
inline
void OpenSim.Tests.Common.MockScriptEngine.SetScriptState ( UUID  itemID,
bool  state 
)
inline
void OpenSim.Tests.Common.MockScriptEngine.SetState ( UUID  itemID,
string  newState 
)
inline
bool OpenSim.Tests.Common.MockScriptEngine.SetXMLState ( UUID  itemID,
string  xml 
)
inline
void OpenSim.Tests.Common.MockScriptEngine.SleepScript ( UUID  itemID,
int  delay 
)
inline
void OpenSim.Tests.Common.MockScriptEngine.StartProcessing ( )
inline

Starts the processing threads.

Implements OpenSim.Region.Framework.Interfaces.IScriptModule.

Definition at line 189 of file MockScriptEngine.cs.

void OpenSim.Tests.Common.MockScriptEngine.SuspendScript ( UUID  itemID)
inline

Suspends a script.

Parameters
itemIDThe item ID of the script.

Implements OpenSim.Region.Framework.Interfaces.IScriptModule.

Definition at line 159 of file MockScriptEngine.cs.

Property Documentation

IConfig OpenSim.Tests.Common.MockScriptEngine.Config
getset

Definition at line 46 of file MockScriptEngine.cs.

IConfigSource OpenSim.Tests.Common.MockScriptEngine.ConfigSource
getset

Definition at line 44 of file MockScriptEngine.cs.

string OpenSim.Tests.Common.MockScriptEngine.Name
get

Definition at line 92 of file MockScriptEngine.cs.

Dictionary<UUID, List<EventParams> > OpenSim.Tests.Common.MockScriptEngine.PostedEvents
getset

Expose posted events to tests.

Definition at line 53 of file MockScriptEngine.cs.

Type OpenSim.Tests.Common.MockScriptEngine.ReplaceableInterface
get

Definition at line 95 of file MockScriptEngine.cs.

string OpenSim.Tests.Common.MockScriptEngine.ScriptBaseClassName
get

Definition at line 257 of file MockScriptEngine.cs.

ParameterInfo [] OpenSim.Tests.Common.MockScriptEngine.ScriptBaseClassParameters
get

Definition at line 261 of file MockScriptEngine.cs.

string OpenSim.Tests.Common.MockScriptEngine.ScriptClassName
get

Definition at line 255 of file MockScriptEngine.cs.

string OpenSim.Tests.Common.MockScriptEngine.ScriptEngineName
get

Definition at line 93 of file MockScriptEngine.cs.

string OpenSim.Tests.Common.MockScriptEngine.ScriptEnginePath
get

Definition at line 253 of file MockScriptEngine.cs.

IScriptModule OpenSim.Tests.Common.MockScriptEngine.ScriptModule
get

Definition at line 251 of file MockScriptEngine.cs.

string [] OpenSim.Tests.Common.MockScriptEngine.ScriptReferencedAssemblies
get

Definition at line 259 of file MockScriptEngine.cs.

Scene OpenSim.Tests.Common.MockScriptEngine.World
get

Definition at line 249 of file MockScriptEngine.cs.

Event Documentation

ObjectRemoved OpenSim.Tests.Common.MockScriptEngine.OnObjectRemoved

Definition at line 99 of file MockScriptEngine.cs.

ScriptRemoved OpenSim.Tests.Common.MockScriptEngine.OnScriptRemoved

Definition at line 98 of file MockScriptEngine.cs.

Action<UUID, EventParams> OpenSim.Tests.Common.MockScriptEngine.PostEventHook

A very primitive way of hooking text cose to a posed event.

May be replaced with something that uses more original code in the future.

Definition at line 61 of file MockScriptEngine.cs.


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