aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-09-16 16:37:16 +0000
committerJustin Clarke Casey2008-09-16 16:37:16 +0000
commit7f3bfa277b894b90e660badf5ee47e4d99ef102c (patch)
tree5da96a515d1d37d9aa59affa3daf42bf5c69428c /OpenSim/Region/ScriptEngine/Shared
parentMantis #1843 (diff)
downloadopensim-SC-7f3bfa277b894b90e660badf5ee47e4d99ef102c.zip
opensim-SC-7f3bfa277b894b90e660badf5ee47e4d99ef102c.tar.gz
opensim-SC-7f3bfa277b894b90e660badf5ee47e4d99ef102c.tar.bz2
opensim-SC-7f3bfa277b894b90e660badf5ee47e4d99ef102c.tar.xz
* minor: method documentation
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs3
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs6
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Dataserver.cs4
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Helpers.cs11
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs17
5 files changed, 31 insertions, 10 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs
index 93a1a80..f331b5c 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs
@@ -149,6 +149,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
149 } 149 }
150 } 150 }
151 151
152 /// <summary>
153 /// Main loop for the manager thread
154 /// </summary>
152 private static void CmdHandlerThreadLoop() 155 private static void CmdHandlerThreadLoop()
153 { 156 {
154 while (true) 157 while (true)
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index a5ff42d..d6c33f6 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -57,7 +57,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
57 /// </summary> 57 /// </summary>
58 public class LSL_Api : MarshalByRefObject, ILSL_Api, IScriptApi 58 public class LSL_Api : MarshalByRefObject, ILSL_Api, IScriptApi
59 { 59 {
60 // private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); 60 private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
61 61
62 internal IScriptEngine m_ScriptEngine; 62 internal IScriptEngine m_ScriptEngine;
63 internal SceneObjectPart m_host; 63 internal SceneObjectPart m_host;
@@ -7925,7 +7925,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7925 } 7925 }
7926 7926
7927 public LSL_Types.LSLString llGetNotecardLine(string name, int line) 7927 public LSL_Types.LSLString llGetNotecardLine(string name, int line)
7928 { 7928 {
7929 m_host.AddScriptLPS(1); 7929 m_host.AddScriptLPS(1);
7930 7930
7931 foreach (TaskInventoryItem item in m_host.TaskInventory.Values) 7931 foreach (TaskInventoryItem item in m_host.TaskInventory.Values)
@@ -7935,6 +7935,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7935 UUID tid = AsyncCommands. 7935 UUID tid = AsyncCommands.
7936 DataserverPlugin.RegisterRequest(m_localID, 7936 DataserverPlugin.RegisterRequest(m_localID,
7937 m_itemID, item.AssetID.ToString()); 7937 m_itemID, item.AssetID.ToString());
7938
7938 if (NotecardCache.IsCached(item.AssetID)) 7939 if (NotecardCache.IsCached(item.AssetID))
7939 { 7940 {
7940 AsyncCommands. 7941 AsyncCommands.
@@ -7943,6 +7944,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7943 // ScriptSleep(100); 7944 // ScriptSleep(100);
7944 return tid.ToString(); 7945 return tid.ToString();
7945 } 7946 }
7947
7946 WithNotecard(item.AssetID, delegate (UUID id, AssetBase a) 7948 WithNotecard(item.AssetID, delegate (UUID id, AssetBase a)
7947 { 7949 {
7948 System.Text.ASCIIEncoding enc = 7950 System.Text.ASCIIEncoding enc =
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Dataserver.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Dataserver.cs
index 7300f10..9676cb3 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Dataserver.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Dataserver.cs
@@ -75,7 +75,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
75 75
76 ds.startTime = DateTime.Now; 76 ds.startTime = DateTime.Now;
77 77
78 DataserverRequests[identifier]=ds; 78 DataserverRequests[identifier] = ds;
79 79
80 return ds.ID; 80 return ds.ID;
81 } 81 }
@@ -90,7 +90,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
90 if (!DataserverRequests.ContainsKey(identifier)) 90 if (!DataserverRequests.ContainsKey(identifier))
91 return; 91 return;
92 92
93 ds=DataserverRequests[identifier]; 93 ds = DataserverRequests[identifier];
94 DataserverRequests.Remove(identifier); 94 DataserverRequests.Remove(identifier);
95 } 95 }
96 96
diff --git a/OpenSim/Region/ScriptEngine/Shared/Helpers.cs b/OpenSim/Region/ScriptEngine/Shared/Helpers.cs
index 8599e06..14266dd 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Helpers.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Helpers.cs
@@ -161,17 +161,20 @@ namespace OpenSim.Region.ScriptEngine.Shared
161 } 161 }
162 } 162 }
163 163
164 /// <summary>
165 /// Holds all the data required to execute a scripting event.
166 /// </summary>
164 public class EventParams 167 public class EventParams
165 { 168 {
166 public EventParams(string eventName, Object[] eventParams, DetectParams[] detectParams) 169 public EventParams(string eventName, Object[] eventParams, DetectParams[] detectParams)
167 { 170 {
168 EventName=eventName; 171 EventName = eventName;
169 Params=eventParams; 172 Params = eventParams;
170 DetectParams=detectParams; 173 DetectParams = detectParams;
171 } 174 }
172 175
173 public string EventName; 176 public string EventName;
174 public Object[] Params; 177 public Object[] Params;
175 public DetectParams[] DetectParams; 178 public DetectParams[] DetectParams;
176 } 179 }
177} 180} \ No newline at end of file
diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
index 8f6108d..da55858 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
@@ -35,7 +35,7 @@ using System.Reflection;
35using System.Globalization; 35using System.Globalization;
36using System.Xml; 36using System.Xml;
37using OpenMetaverse; 37using OpenMetaverse;
38using log4net; 38//using log4net;
39using Nini.Config; 39using Nini.Config;
40using Amib.Threading; 40using Amib.Threading;
41using OpenSim.Framework; 41using OpenSim.Framework;
@@ -52,8 +52,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
52{ 52{
53 public class ScriptInstance : IScriptInstance 53 public class ScriptInstance : IScriptInstance
54 { 54 {
55 //private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
56
55 private IScriptEngine m_Engine; 57 private IScriptEngine m_Engine;
56 private IScriptWorkItem m_CurrentResult=null; 58 private IScriptWorkItem m_CurrentResult = null;
57 private Queue m_EventQueue = new Queue(32); 59 private Queue m_EventQueue = new Queue(32);
58 private bool m_RunEvents = false; 60 private bool m_RunEvents = false;
59 private UUID m_ItemID; 61 private UUID m_ItemID;
@@ -455,6 +457,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
455 } 457 }
456 } 458 }
457 459
460 /// <summary>
461 /// Process the next event queued for this script
462 /// </summary>
463 /// <returns></returns>
458 public object EventProcessor() 464 public object EventProcessor()
459 { 465 {
460 EventParams data = null; 466 EventParams data = null;
@@ -470,6 +476,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
470 if (data.EventName == "timer") 476 if (data.EventName == "timer")
471 m_TimerQueued = false; 477 m_TimerQueued = false;
472 } 478 }
479
480 //m_log.DebugFormat("[XENGINE]: Processing event {0} for {1}", data.EventName, this);
473 481
474 m_DetectParams = data.DetectParams; 482 m_DetectParams = data.DetectParams;
475 483
@@ -721,5 +729,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
721 return m_Apis[name]; 729 return m_Apis[name];
722 return null; 730 return null;
723 } 731 }
732
733 public override string ToString()
734 {
735 return String.Format("{0} {1} on {2}", m_ScriptName, m_ItemID, m_PrimName);
736 }
724 } 737 }
725} 738}