Package org.protelis.vm
Interface TimeAwareDevice<D extends java.lang.Number>
-
- Type Parameters:
D
- number type
- All Superinterfaces:
ExecutionContext
public interface TimeAwareDevice<D extends java.lang.Number> extends ExecutionContext
A time-aware device.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Field<D>
nbrDelay()
Time forward view: expected time from the device computation to neighbor's next computation incorporating that information.Field<D>
nbrLag()
Time backward view: how long ago information from neighbors was received.-
Methods inherited from interface org.protelis.vm.ExecutionContext
buildField, buildFieldDeferred, commit, getCurrentTime, getDeltaTime, getDeviceUID, getExecutionEnvironment, getPersistent, getVariable, newCallStackFrame, newCallStackFrame, nextRandomDouble, putMultipleVariables, putVariable, restrictDomain, returnFromCallFrame, runInNewStackFrame, setGloballyAvailableReferences, setPersistent, setup
-
-
-
-
Method Detail
-
nbrDelay
Field<D> nbrDelay()
Time forward view: expected time from the device computation to neighbor's next computation incorporating that information. For device's neighbors: nbrDelay is the best estimate that the underlying system can provide. For the current device: nbrDelay is self.getDeltaTime().- Returns:
- field of communication delays
-
nbrLag
Field<D> nbrLag()
Time backward view: how long ago information from neighbors was received. For device's neighbors: nbrRange is the time of the computation minus the timestamp on the packet. Dropped packets temporarily increase nbrLag. For the current device: nbrRange is self.getDeltaTime().- Returns:
- field of communication latencies
-
-