|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--net.tinyos.sim.script.reflect.SimReflect
|
+--net.tinyos.sim.script.reflect.Interp
The Interp class controls operations on the python interpreter, specifically the management of events.
The class is bound into the simcore module as the interp global instance.
| Constructor Summary | |
|---|---|
Interp(net.tinyos.sim.script.ScriptInterpreter interp,
net.tinyos.sim.SimDriver driver)
|
|
| Method Summary | |
|---|---|
int |
addEventHandler(org.python.core.PyFunction callback)
Equivalent to addEventHandler(callback, null); |
int |
addEventHandler(org.python.core.PyFunction callback,
org.python.core.PyJavaClass eventclass)
Registers a given python function as a callback. |
int |
getInterruptID()
Get a unique interrupt ID. |
void |
interruptInFuture(long time,
int interruptID)
Schedule an interrupt event. |
void |
removeEventHandler(int id)
Removes the previously registered handler. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Interp(net.tinyos.sim.script.ScriptInterpreter interp,
net.tinyos.sim.SimDriver driver)
| Method Detail |
public int addEventHandler(org.python.core.PyFunction callback,
org.python.core.PyJavaClass eventclass)
throws java.lang.ClassNotFoundException
callback - python function to call on matching events
java.lang.ClassNotFoundExceptionpublic int addEventHandler(org.python.core.PyFunction callback)
public void removeEventHandler(int id)
id - event handler id to removepublic int getInterruptID()
public void interruptInFuture(long time,
int interruptID)
throws java.io.IOException
time - simulator time when to do the operationinterruptID - id code for the interrupt event
java.io.IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||