hmi.elckerlyc
Class TimePeg

java.lang.Object
  extended by hmi.elckerlyc.TimePeg
Direct Known Subclasses:
OffsetPeg

@ThreadSafe
public class TimePeg
extends Object

BML SynchronisationPoint, used in the realizer as intermediate, slightly flexible timing structure. One can construct OffsetPegs that define a TimePegs that remains at a fixed time offset from a 'regular' TimePeg. Sub classes should retain thread-safety. All Time Pegs are declared relative to the start time of a BMLBlock.

Author:
welberge

Field Summary
private  boolean absoluteTime
           
protected  BMLBlockPeg bmlBlockPeg
           
private  double value
           
static double VALUE_UNKNOWN
           
 
Constructor Summary
TimePeg(BMLBlockPeg bmp)
           
 
Method Summary
 double getGlobalValue()
           
 TimePeg getLink()
          Get the 'underlying' TimePeg.
(package private)  double getLocalValue()
          get the value of the SynchronisationPoint
 boolean isAbsoluteTime()
           
 void setAbsoluteTime(boolean absTime)
          Sets whether this timepeg links to an absolute time value (default is false).
 void setGlobalValue(double v)
          Set the value of the SynchronisationPoint.
 void setLocalValue(double v)
          Set the value of the SynchronisationPoint.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

VALUE_UNKNOWN

public static final double VALUE_UNKNOWN
See Also:
Constant Field Values

bmlBlockPeg

protected final BMLBlockPeg bmlBlockPeg

value

private double value

absoluteTime

private boolean absoluteTime
Constructor Detail

TimePeg

public TimePeg(BMLBlockPeg bmp)
Method Detail

isAbsoluteTime

public boolean isAbsoluteTime()
Returns:
true if the timepeg is linked to an absolute time value.

setAbsoluteTime

public void setAbsoluteTime(boolean absTime)
Sets whether this timepeg links to an absolute time value (default is false).


getLink

public TimePeg getLink()
Get the 'underlying' TimePeg. Used to get the linked 'real' TimePeg for OffsetPegs, mainly in schedulers.


getLocalValue

double getLocalValue()
get the value of the SynchronisationPoint

Returns:
the value of the SynchronisationPoint

getGlobalValue

public double getGlobalValue()

setLocalValue

public void setLocalValue(double v)
Set the value of the SynchronisationPoint.

Parameters:
value - the new value

setGlobalValue

public void setGlobalValue(double v)
Set the value of the SynchronisationPoint.

Parameters:
value - the new value

toString

public String toString()
Overrides:
toString in class Object