public class ProtelisVM
extends java.lang.Object
| Constructor and Description |
|---|
ProtelisVM(ProtelisProgram program,
ExecutionContext context)
Create a virtual machine for executing a Protelis program in a particular
context.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
getCurrentValue()
Return the value computed in the most recent execution cycle.
|
void |
runCycle()
Run one execution cycle of the VM, in which the computation is run
atomically against the most recent neighbor and environment information,
producing a new state to be committed to the environment and sent to
neighbors.
|
public ProtelisVM(ProtelisProgram program, ExecutionContext context)
program - Protelis program to be executedcontext - Environment in which this program will be executedpublic void runCycle()
@Nonnull public java.lang.Object getCurrentValue()