Raritan PX2/PX3 JSON-RPC API
LuaService.idl
1 
30 module luaservice {
31 
41  structure ScriptState {
42 
44  enumeration ExecState {
48  STAT_RESTARTING
49  };
50 
52  enumeration ExitType {
54  SIGNAL
55  };
56 
59  int exitStatus;
60  };
61 
63  structure ScriptOptions_2_0_0 {
64  map <string, string> defaultArgs;
65  boolean autoStart;
66  boolean autoRestart;
67  };
68 
76  structure Environment_2_0_0 {
86  };
87 
91  interface Manager_2_0_1 {
92 
94  constant int NO_ERROR = 0;
95  constant int ERR_INVALID_NAME = 1;
96  constant int ERR_NO_SUCH_SCRIPT = 2;
97  constant int ERR_MAX_SCRIPT_NUMBERS_EXCEEDED = 3;
98  constant int ERR_MAX_SCRIPT_SIZE_EXCEEDED = 4;
99  constant int ERR_MAX_ALL_SCRIPT_SIZE_EXCEEDED = 5;
100  constant int ERR_NOT_TERMINATED = 6;
101  constant int ERR_NOT_RUNNING = 7;
102  constant int ERR_INVALID_ADDR = 8;
103  constant int ERR_TOO_MANY_ARGUMENTS = 10;
104  constant int ERR_ARGUMENT_NOT_VALID = 11;
105 
123  int setScript(in string name, in string script, in ScriptOptions_2_0_0 options);
124 
134  int getScript(in string name, out string script);
135 
143  vector<string> getScriptNames();
144 
155  int deleteScript(in string name);
156 
169  int setScriptOptions(in string name, in ScriptOptions_2_0_0 options);
170 
181  int getScriptOptions(in string name, out ScriptOptions_2_0_0 options);
182 
188  Environment_2_0_0 getEnvironment();
189 
216  int getScriptOutput(in string name, in long iAddr, out long oAddr, out long nAddr, out string oString, out boolean more);
217 
227  int clearScriptOutput(in string name);
228 
239  int startScript(in string name);
240 
255  int startScriptWithArgs(in string name, in map<string, string> arguments);
256 
268  int terminateScript(in string name);
269 
280  int getScriptState(in string name, out ScriptState state);
281 
282 
288  map<string, ScriptState> getScriptStates();
289  };
290 
291 }
int maxScriptMemoryGrowth
maximum virtual memory growth per script (l)
Definition: LuaService.idl:77
ExitType exitType
type of exit code
Definition: LuaService.idl:58
some script options
Definition: LuaService.idl:63
script state is terminated
Definition: LuaService.idl:47
int outputBufferSize
output buffer size per script (l)
Definition: LuaService.idl:83
the script never ran (after uploading or system (re)start)
Definition: LuaService.idl:45
int exitStatus
exit status or signal
Definition: LuaService.idl:59
There is a single manager instance.
Definition: LuaService.idl:91
int maxAllScriptSize
maximum size of all script files (l)
Definition: LuaService.idl:81
int maxScriptSize
maximum size of a script file (l)
Definition: LuaService.idl:80
A structure that descripts the state of a script.
Definition: LuaService.idl:41
ExecState execState
execution state of the script
Definition: LuaService.idl:57
int maxAmountOfScripts
number of scripts that can be stored (l)
Definition: LuaService.idl:78
The struct represents two kinds of information:
Definition: LuaService.idl:76
boolean autoStart
starts a script after system booting
Definition: LuaService.idl:65
Lua-Service.
Definition: LuaService.idl:30
exitStatus is an exit code
Definition: LuaService.idl:53
ExitType
Descripts the type of exitStatus.
Definition: LuaService.idl:52
int amountOfScripts
number of scripts that are stored (cs)
Definition: LuaService.idl:79
int autoStartDelay
minimum delay to &#39;autoStart&#39; a script
Definition: LuaService.idl:85
int restartInterval
minimum delay to next (re)start (cs)
Definition: LuaService.idl:84
ExecState
execution state for a scripts
Definition: LuaService.idl:44
script state is running
Definition: LuaService.idl:46
map< string, string > defaultArgs
default arguments are passed to the lua script
Definition: LuaService.idl:64
int allScriptSize
size of all script files (cs)
Definition: LuaService.idl:82
boolean autoRestart
restarts a script after termination or crash
Definition: LuaService.idl:66