OpenSim
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Public Member Functions | Events | List of all members
OpenSim.Region.Framework.Interfaces.IScriptModuleComms Interface Reference

Interface for communication between OpenSim modules and in-world scripts More...

Inheritance diagram for OpenSim.Region.Framework.Interfaces.IScriptModuleComms:
Inheritance graph
[legend]

Public Member Functions

void RegisterScriptInvocation (object target, string method)
 Register an instance method as a script call by method name More...
 
void RegisterScriptInvocation (object target, MethodInfo method)
 Register a static or instance method as a script call by method info More...
 
void RegisterScriptInvocation (object target, string[] methods)
 Register one or more instance methods as script calls by method name More...
 
void RegisterScriptInvocation (Type target, string[] methods)
 Register one or more static methods as script calls by method name More...
 
void RegisterScriptInvocations (IRegionModuleBase target)
 Automatically register script invocations by checking for methods with ScriptInvocationAttribute. Should only check public methods. More...
 
Delegate[] GetScriptInvocationList ()
 Returns an array of all registered script calls More...
 
Delegate LookupScriptInvocation (string fname)
 
string LookupModInvocation (string fname)
 
Type[] LookupTypeSignature (string fname)
 
Type LookupReturnType (string fname)
 
object InvokeOperation (UUID hostId, UUID scriptId, string fname, params object[] parms)
 
void DispatchReply (UUID scriptId, int code, string text, string key)
 Send a link_message event to an in-world script More...
 
void RegisterConstant (string cname, object value)
 Operation to for a region module to register a constant to be used by the script engine More...
 
void RegisterConstants (IRegionModuleBase target)
 Automatically register all constants on a region module by checking for fields with ScriptConstantAttribute. More...
 
object LookupModConstant (string cname)
 Operation to check for a registered constant More...
 
Dictionary< string, object > GetConstants ()
 
void RaiseEvent (UUID script, string id, string module, string command, string key)
 

Events

ScriptCommand OnScriptCommand
 Modules can subscribe to this event to receive command invocations from in-world scripts More...
 

Detailed Description

Interface for communication between OpenSim modules and in-world scripts

See OpenSim.Region.ScriptEngine.Shared.Api.MOD_Api.modSendCommand() for information on receiving messages from scripts in OpenSim modules.

Definition at line 43 of file IScriptModuleComms.cs.

Member Function Documentation

void OpenSim.Region.Framework.Interfaces.IScriptModuleComms.DispatchReply ( UUID  scriptId,
int  code,
string  text,
string  key 
)

Send a link_message event to an in-world script

Parameters
scriptId
code
text
key

Implemented in OpenSim.Region.CoreModules.Scripting.ScriptModuleComms.ScriptModuleCommsModule.

Dictionary<string, object> OpenSim.Region.Framework.Interfaces.IScriptModuleComms.GetConstants ( )
Delegate [] OpenSim.Region.Framework.Interfaces.IScriptModuleComms.GetScriptInvocationList ( )

Returns an array of all registered script calls

Returns

Implemented in OpenSim.Region.CoreModules.Scripting.ScriptModuleComms.ScriptModuleCommsModule.

object OpenSim.Region.Framework.Interfaces.IScriptModuleComms.InvokeOperation ( UUID  hostId,
UUID  scriptId,
string  fname,
params object[]  parms 
)
object OpenSim.Region.Framework.Interfaces.IScriptModuleComms.LookupModConstant ( string  cname)

Operation to check for a registered constant

Parameters
cnameName of constant
Returns
Value of constant or null if none found.

Implemented in OpenSim.Region.CoreModules.Scripting.ScriptModuleComms.ScriptModuleCommsModule.

string OpenSim.Region.Framework.Interfaces.IScriptModuleComms.LookupModInvocation ( string  fname)
Type OpenSim.Region.Framework.Interfaces.IScriptModuleComms.LookupReturnType ( string  fname)
Delegate OpenSim.Region.Framework.Interfaces.IScriptModuleComms.LookupScriptInvocation ( string  fname)
Type [] OpenSim.Region.Framework.Interfaces.IScriptModuleComms.LookupTypeSignature ( string  fname)
void OpenSim.Region.Framework.Interfaces.IScriptModuleComms.RaiseEvent ( UUID  script,
string  id,
string  module,
string  command,
string  key 
)
void OpenSim.Region.Framework.Interfaces.IScriptModuleComms.RegisterConstant ( string  cname,
object  value 
)

Operation to for a region module to register a constant to be used by the script engine

Parameters
cnameThe name of the constant. LSL convention is for constant names to be uppercase.
valueThe value of the constant. Should be of a type that can be converted to one of OpenSim.Region.ScriptEngine.Shared.LSL_Types

Implemented in OpenSim.Region.CoreModules.Scripting.ScriptModuleComms.ScriptModuleCommsModule.

void OpenSim.Region.Framework.Interfaces.IScriptModuleComms.RegisterConstants ( IRegionModuleBase  target)

Automatically register all constants on a region module by checking for fields with ScriptConstantAttribute.

Parameters
target

Implemented in OpenSim.Region.CoreModules.Scripting.ScriptModuleComms.ScriptModuleCommsModule.

void OpenSim.Region.Framework.Interfaces.IScriptModuleComms.RegisterScriptInvocation ( object  target,
string  method 
)

Register an instance method as a script call by method name

Parameters
target
method

Implemented in OpenSim.Region.CoreModules.Scripting.ScriptModuleComms.ScriptModuleCommsModule.

void OpenSim.Region.Framework.Interfaces.IScriptModuleComms.RegisterScriptInvocation ( object  target,
MethodInfo  method 
)

Register a static or instance method as a script call by method info

Parameters
targetIf target is a Type object, will assume method is static.
method

Implemented in OpenSim.Region.CoreModules.Scripting.ScriptModuleComms.ScriptModuleCommsModule.

void OpenSim.Region.Framework.Interfaces.IScriptModuleComms.RegisterScriptInvocation ( object  target,
string[]  methods 
)

Register one or more instance methods as script calls by method name

Parameters
target
methods

Implemented in OpenSim.Region.CoreModules.Scripting.ScriptModuleComms.ScriptModuleCommsModule.

void OpenSim.Region.Framework.Interfaces.IScriptModuleComms.RegisterScriptInvocation ( Type  target,
string[]  methods 
)

Register one or more static methods as script calls by method name

Parameters
target
methods

Implemented in OpenSim.Region.CoreModules.Scripting.ScriptModuleComms.ScriptModuleCommsModule.

void OpenSim.Region.Framework.Interfaces.IScriptModuleComms.RegisterScriptInvocations ( IRegionModuleBase  target)

Automatically register script invocations by checking for methods with ScriptInvocationAttribute. Should only check public methods.

Parameters
target

Implemented in OpenSim.Region.CoreModules.Scripting.ScriptModuleComms.ScriptModuleCommsModule.

Event Documentation

ScriptCommand OpenSim.Region.Framework.Interfaces.IScriptModuleComms.OnScriptCommand

Modules can subscribe to this event to receive command invocations from in-world scripts

Definition at line 48 of file IScriptModuleComms.cs.


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