hmi.elckerlyc
Class OffsetPeg

java.lang.Object
  extended by hmi.elckerlyc.TimePeg
      extended by hmi.elckerlyc.OffsetPeg

@ThreadSafe
public final class OffsetPeg
extends TimePeg

OffsetPegs define TimePegs that remains at a fixed time offset from a 'regular' TimePeg. An OffsetPeg can refer to another OffsetPeg as it's 'link'.

Author:
welberge

Field Summary
private  TimePeg link
           
private  double offset
           
 
Fields inherited from class hmi.elckerlyc.TimePeg
bmlBlockPeg, VALUE_UNKNOWN
 
Constructor Summary
OffsetPeg(double o, BMLBlockPeg bmp)
           
OffsetPeg(TimePeg l, double o)
           
OffsetPeg(TimePeg l, double o, BMLBlockPeg bmp)
           
 
Method Summary
 double getGlobalValue()
          get the value of the SynchronisationPoint
 TimePeg getLink()
          Get the 'underlying' TimePeg.
(package private)  double getLocalValue()
          get the value of the SynchronisationPoint
 void setGlobalValue(double v)
          Set the value of the SynchronisationPoint.
 void setLink(TimePeg p)
           
 void setLocalValue(double v)
          Set the value of the SynchronisationPoint.
 void setOffset(double o)
           
 String toString()
           
 
Methods inherited from class hmi.elckerlyc.TimePeg
isAbsoluteTime, setAbsoluteTime
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

link

private TimePeg link

offset

private double offset
Constructor Detail

OffsetPeg

public OffsetPeg(double o,
                 BMLBlockPeg bmp)

OffsetPeg

public OffsetPeg(TimePeg l,
                 double o)

OffsetPeg

public OffsetPeg(TimePeg l,
                 double o,
                 BMLBlockPeg bmp)
Method Detail

setOffset

public void setOffset(double o)

setLink

public void setLink(TimePeg p)

getLink

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

Overrides:
getLink in class TimePeg

getLocalValue

double getLocalValue()
get the value of the SynchronisationPoint

Overrides:
getLocalValue in class TimePeg
Returns:
the value of the SynchronisationPoint

getGlobalValue

public double getGlobalValue()
get the value of the SynchronisationPoint

Overrides:
getGlobalValue in class TimePeg
Returns:
the value of the SynchronisationPoint

setLocalValue

public void setLocalValue(double v)
Description copied from class: TimePeg
Set the value of the SynchronisationPoint.

Overrides:
setLocalValue in class TimePeg

setGlobalValue

public void setGlobalValue(double v)
Description copied from class: TimePeg
Set the value of the SynchronisationPoint.

Overrides:
setGlobalValue in class TimePeg

toString

public String toString()
Overrides:
toString in class TimePeg