diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs | 53 |
1 files changed, 52 insertions, 1 deletions
diff --git a/OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs b/OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs index b04f6b6..2f5b526 100644 --- a/OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs +++ b/OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs | |||
@@ -59,6 +59,18 @@ namespace OpenSim.Region.ScriptEngine.Interfaces | |||
59 | public interface IScriptInstance | 59 | public interface IScriptInstance |
60 | { | 60 | { |
61 | /// <summary> | 61 | /// <summary> |
62 | /// Debug level for this script instance. | ||
63 | /// </summary> | ||
64 | /// <remarks> | ||
65 | /// Level == 0, no extra data is logged. | ||
66 | /// Level >= 1, state changes are logged. | ||
67 | /// Level >= 2, event firing is logged. | ||
68 | /// <value> | ||
69 | /// The debug level. | ||
70 | /// </value> | ||
71 | int DebugLevel { get; set; } | ||
72 | |||
73 | /// <summary> | ||
62 | /// Is the script currently running? | 74 | /// Is the script currently running? |
63 | /// </summary> | 75 | /// </summary> |
64 | bool Running { get; set; } | 76 | bool Running { get; set; } |
@@ -114,6 +126,16 @@ namespace OpenSim.Region.ScriptEngine.Interfaces | |||
114 | UUID AssetID { get; } | 126 | UUID AssetID { get; } |
115 | Queue EventQueue { get; } | 127 | Queue EventQueue { get; } |
116 | 128 | ||
129 | /// <summary> | ||
130 | /// Number of events queued for processing. | ||
131 | /// </summary> | ||
132 | long EventsQueued { get; } | ||
133 | |||
134 | /// <summary> | ||
135 | /// Number of events processed by this script instance. | ||
136 | /// </summary> | ||
137 | long EventsProcessed { get; } | ||
138 | |||
117 | void ClearQueue(); | 139 | void ClearQueue(); |
118 | int StartParam { get; set; } | 140 | int StartParam { get; set; } |
119 | 141 | ||
@@ -125,7 +147,13 @@ namespace OpenSim.Region.ScriptEngine.Interfaces | |||
125 | /// <summary> | 147 | /// <summary> |
126 | /// Stop the script instance. | 148 | /// Stop the script instance. |
127 | /// </summary> | 149 | /// </summary> |
150 | /// <remarks> | ||
151 | /// This must not be called by a thread that is in the process of handling an event for this script. Otherwise | ||
152 | /// there is a danger that it will self-abort and not complete the reset. | ||
153 | /// </remarks> | ||
128 | /// <param name="timeout"></param> | 154 | /// <param name="timeout"></param> |
155 | /// How many milliseconds we will wait for an existing script event to finish before | ||
156 | /// forcibly aborting that event. | ||
129 | /// <returns>true if the script was successfully stopped, false otherwise</returns> | 157 | /// <returns>true if the script was successfully stopped, false otherwise</returns> |
130 | bool Stop(int timeout); | 158 | bool Stop(int timeout); |
131 | 159 | ||
@@ -147,8 +175,31 @@ namespace OpenSim.Region.ScriptEngine.Interfaces | |||
147 | object EventProcessor(); | 175 | object EventProcessor(); |
148 | 176 | ||
149 | int EventTime(); | 177 | int EventTime(); |
150 | void ResetScript(); | 178 | |
179 | /// <summary> | ||
180 | /// Reset the script. | ||
181 | /// </summary> | ||
182 | /// <remarks> | ||
183 | /// This must not be called by a thread that is in the process of handling an event for this script. Otherwise | ||
184 | /// there is a danger that it will self-abort and not complete the reset. Such a thread must call | ||
185 | /// ApiResetScript() instead. | ||
186 | /// </remarks> | ||
187 | /// <param name='timeout'> | ||
188 | /// How many milliseconds we will wait for an existing script event to finish before | ||
189 | /// forcibly aborting that event prior to script reset. | ||
190 | /// </param> | ||
191 | void ResetScript(int timeout); | ||
192 | |||
193 | /// <summary> | ||
194 | /// Reset the script. | ||
195 | /// </summary> | ||
196 | /// <remarks> | ||
197 | /// This must not be called by any thread other than the one executing the scripts current event. This is | ||
198 | /// because there is no wait or abort logic if another thread is in the middle of processing a script event. | ||
199 | /// Such an external thread should use ResetScript() instead. | ||
200 | /// </remarks> | ||
151 | void ApiResetScript(); | 201 | void ApiResetScript(); |
202 | |||
152 | Dictionary<string, object> GetVars(); | 203 | Dictionary<string, object> GetVars(); |
153 | void SetVars(Dictionary<string, object> vars); | 204 | void SetVars(Dictionary<string, object> vars); |
154 | DetectParams GetDetectParams(int idx); | 205 | DetectParams GetDetectParams(int idx); |