com.sun.electric.tool.simulation
Class Signal

java.lang.Object
  extended by com.sun.electric.tool.simulation.Signal
Direct Known Subclasses:
AnalogSignal, DigitalSignal

public abstract class Signal
extends java.lang.Object

Class to define the basic parts of a signal in the simulation waveform window. This is a superclass for specific signal types: Measurement and TimedSignal (which has under it DigitalSignal and AnalogSignal).


Field Summary
protected  java.awt.geom.Rectangle2D bounds
          the range of values in the X and Y axes
protected  double leftEdge
          the left and right X values
protected  double rightEdge
          the left and right X values
 
Constructor Summary
Signal()
           
 
Method Summary
 void addControlPoint(double time)
          Method to add a new control point to the list on this signal.
protected  void calcBounds()
           
 void clearControlPoints()
          Method to clear the list of control points associated with this signal.
 void finished()
           
abstract  Analysis getAnalysis()
          Method to return the Analysis in which this signal resides.
 java.awt.geom.Rectangle2D getBounds()
          Method to compute the time and value bounds of this simulation signal.
 java.lang.Double[] getControlPoints()
          Method to return a list of control points associated with this signal.
 java.lang.String getFullName()
          Method to return the full name of this simulation signal.
 double getLeftEdge()
          Method to return the leftmost X coordinate of this simulation signal.
 double getRightEdge()
          Method to return the rightmost X coordinate of this simulation signal.
 java.lang.String getSignalContext()
          Method to return the context of this simulation signal.
 java.lang.String getSignalName()
          Method to return the name of this simulation signal.
 void removeControlPoint(double time)
          Method to remove control points the list on this signal.
 void setSignalContext(java.lang.String signalContext)
          Method to return the context of this simulation signal.
 void setSignalName(java.lang.String signalName, java.lang.String signalContext)
          Method to set the name and context of this simulation signal.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

bounds

protected java.awt.geom.Rectangle2D bounds
the range of values in the X and Y axes


leftEdge

protected double leftEdge
the left and right X values


rightEdge

protected double rightEdge
the left and right X values

Constructor Detail

Signal

public Signal()
Method Detail

finished

public void finished()

getAnalysis

public abstract Analysis getAnalysis()
Method to return the Analysis in which this signal resides.

Returns:
the Analysis in which this signal resides.

setSignalName

public void setSignalName(java.lang.String signalName,
                          java.lang.String signalContext)
Method to set the name and context of this simulation signal. The name does not include any hierarchical path information: it is just a simple name. The context is the hierarchical path to the signal, and it usually contains instance names of cells farther up the hierarchy, all separated by dots.

Parameters:
signalName - the name of this simulation signal.
signalContext - the context of this simulation signal.

getSignalName

public java.lang.String getSignalName()
Method to return the name of this simulation signal. The name does not include any hierarchical path information: it is just a simple name.

Returns:
the name of this simulation signal.

setSignalContext

public void setSignalContext(java.lang.String signalContext)
Method to return the context of this simulation signal. The context is the hierarchical path to the signal, and it usually contains instance names of cells farther up the hierarchy, all separated by dots.

Parameters:
signalContext - the context of this simulation signal.

getSignalContext

public java.lang.String getSignalContext()
Method to return the context of this simulation signal. The context is the hierarchical path to the signal, and it usually contains instance names of cells farther up the hierarchy, all separated by dots.

Returns:
the context of this simulation signal. If there is no context, this returns null.

getFullName

public java.lang.String getFullName()
Method to return the full name of this simulation signal. The full name includes the context, if any.

Returns:
the full name of this simulation signal.

getControlPoints

public java.lang.Double[] getControlPoints()
Method to return a list of control points associated with this signal. Control points are places where the user has added stimuli to the signal (set a level or strength). These points can be selected for change of the stimuli. Note that the control point structures are not stored on this object because that would consume too much memory for such little-used information. Instead, the control point data is stored in HashMaps on the Stimuli.

Returns:
an array of times where there are control points. Null if no control points are defined.

clearControlPoints

public void clearControlPoints()
Method to clear the list of control points associated with this signal. Control points are places where the user has added stimuli to the signal (set a level or strength). These points can be selected for change of the stimuli. Note that the control point structures are not stored on this object because that would consume too much memory for such little-used information. Instead, the control point data is stored in HashMaps on the Stimuli.


addControlPoint

public void addControlPoint(double time)
Method to add a new control point to the list on this signal. Control points are places where the user has added stimuli to the signal (set a level or strength). These points can be selected for change of the stimuli. Note that the control point structures are not stored on this object because that would consume too much memory for such little-used information. Instead, the control point data is stored in HashMaps on the Stimuli.

Parameters:
time - the time of the new control point.

removeControlPoint

public void removeControlPoint(double time)
Method to remove control points the list on this signal. Control points are places where the user has added stimuli to the signal (set a level or strength). These points can be selected for change of the stimuli. Note that the control point structures are not stored on this object because that would consume too much memory for such little-used information. Instead, the control point data is stored in HashMaps on the Stimuli.

Parameters:
time - the time of the control point to delete.

getBounds

public java.awt.geom.Rectangle2D getBounds()
Method to compute the time and value bounds of this simulation signal.

Returns:
a Rectangle2D that has time bounds in the X part and value bounds in the Y part. For digital signals, the Y part is simply 0 to 1.

getLeftEdge

public double getLeftEdge()
Method to return the leftmost X coordinate of this simulation signal. This value may not be the same as the minimum-x of the bounds, because the data may not be monotonically increasing (may run backwards, for example).

Returns:
the leftmost X coordinate of this simulation signal.

getRightEdge

public double getRightEdge()
Method to return the rightmost X coordinate of this simulation signal. This value may not be the same as the maximum-x of the bounds, because the data may not be monotonically increasing (may run backwards, for example).

Returns:
the rightmost X coordinate of this simulation signal.

calcBounds

protected void calcBounds()