/**
* If a VoltageNode has no registered VoltageSource then it's assigned the value of FLOATING_VOLTAGE
*/
public static final double FLOATING_VOLTAGE = -100.0; /*** The voltage level VDD, nominally 5V
*/
public static final double VDD = 1.0; /*** The voltage level VSS, nominally 0V, GND
*/
public static final double VSS = 0.0; /*** Assign a HIGH or LOW value to the VoltageNode
*
* @param v the HIGH or LOW value to assign the VoltageNode
*/
public void setBooleanVoltage(boolean v); /*** Returns the current voltage level on the VoltageNode as boolean HIGH or LOW
* @return the voltage level of the VoltageNode as boolean HIGH or LOW
*/
public boolean getBooleanVoltage(); /*** Tests if the VoltageNode is driven LOW
* @return true if the VoltageNode has a registered VoltageSource and is driven LOW
*/
public boolean isLow(); /*** Tests if the VoltageNode is driven HIGH
* @return true if the VoltageNode has a registered VoltageSource and is driven HIGH
*/
public boolean isHigh(); /*** Drives the VoltageNode LOW.
*
<p>* Drives the VoltageNode LOW, this Component must be resitered as the VoltageSource
*/
public void setLow(); /*** Drives the VoltageNode HIGH.
*
<p>* Drives the VoltageNode HIGH, this Component must be resitered as the VoltageSource
*/
public void setHigh(); /*** Tests if the VoltageNode has just changed voltage levels from LOW to HIGH
* @return true if the VoltageNode changed voltage levels from LOW to HIGH in this step clock time
*/
public boolean isRisingEdge(); /*** Tests if the VoltageNode has just changed voltage levels from HIGH to LOW
* @return true if the VoltageNode changed voltage levels from HIGH to LOW in this step clock time
*/
public boolean isFallingEdge(); /*** Returns the current voltage level on the VoltageNode.
* @return the current voltage level on the VoltageNode
*/
public double getVoltage(); /*** Assigns the voltage level to the VoltageNode
* @param v the voltage level to assign to the VoltageNode, this Component must be the registered VoltageSource for the VoltageNode
*/
public void setVoltage(double v); public void RegisterAsVoltageListener(IopenVBBVoltageChangeListener listener); public void UnRegisterAsVoltageListener(IopenVBBVoltageChangeListener listener); /*** Registers this Component as the VoltageSource for the VoltageNode
*
<p>* Drives the voltageNode with an initialVoltage value. There can only be one registered VoltageSource for each VoltageNode.
*
* @param registerMe the component to Register as the VoltageSource for the VoltageNode
* @param initialVoltage the initial voltage level to drive the voltage node to
*/
public void RegisterAsVoltageSource( IopenVBBInterface registerMe, double initialVoltage ); /*** Registers this Component as a VoltageSink for the VoltageNode
*
<p>* VoltageSinks can read the voltage level on a VoltageNode and recieve change events when the driven level changes.
* There can be more than one Component registered as a voltage sink for a VoltageNode
*
* @param registerMe the Component to register as a VoltageSink for this VoltageNode
*/
public void RegisterAsVoltageSink(IopenVBBInterface registerMe); /*** Unregisters this Component as a VoltageSource for the VoltageNode
*
<p>* Removes the Component as the VoltageSource for the VoltageNode and stops driving the VoltageNode.
* All VoltageSinks will now see FLOATING_VOLTAGE as the voltage on the VoltageNode
*
* @param unregisterMe the Component to unregister
*/
public void UnRegisterAsVoltageSource(IopenVBBInterface unregisterMe); /*** Unregisters this Component as a VoltageSink for the VoltageNode
*
<p>* Removes the Component from the VoltageNode VoltageSink list.
* The Component will stop receiveing
<code>sweepPin</code> notifications when the voltage changes on the VoltageNode*
* @param unregisterMe the Component to unregister
*/
public void UnRegisterAsVoltageSink(IopenVBBInterface unregisterMe); /*** Tests if a Component is a member of the VoltageSink list maintained by the VoltageNode
*
* @param isMe the Component to test
* @return true if the specified component is a member of the VoltageSink list for this VoltageNode
*/
public boolean isARegisteredVoltageSink(IopenVBBInterface isMe); /*** Tests if a Component is the registered VoltageSource for this VoltageNode
* @param isMe the Component to test
*
* @return true if the specified component is the registered VoltageSource for this VoltageNode
*/
public boolean isARegisteredVoltageSource(IopenVBBInterface isMe); /*** Returns the registered VoltageSource for this VoltageNode
*
* @return the registered VoltageSource for this VoltageNode
*/
public IopenVBBInterface getVoltageSource(); public IopenVBBInterface getVoltageSource( int index ); /*** Returns the specified VoltageSink from VoltageSink list maintained by this VoltageNode
*
* @param SinkIndex the specified index
* @return the specified VoltageSink
*/
public IopenVBBInterface getVoltageSink(int SinkIndex); /*** Returns the number of VoltageSink Components current registered with this VoltageNode
*
* @return the number of VoltageSink Components registered with this VoltageNode
*/
public int getSinkCount(); /*** Tests if there has been a VoltageSource Component registered with this VoltageNode
* @return true if there has been a VoltageSource Component registered with this VoltageNode
*/
public boolean isSourceSet(); /*** Merges two VoltageNodes into a single VoltageNode.
*
<p>* Both VoltageNodes share the same VoltageSource and merge all VoltageSinks are merged together.
* This is used to model a physical connection like a switch
*
* @param VoltageNode the VoltageNode to merge with this VoltageNode
*/
public void makeJoin(IopenVBBVoltage VoltageNode); /*** Breaks the join between two VoltageNodes previously joined with
<code>makeJoin</code>*
<p>* Restores the VoltageNodes to seperate nodes with their own distinct sets of VoltageSource and VoltageSinks
* previously merged together with the
<code>makeJoin</code> operator. <code>breakJoin</code> is used to model* the breaking of a physical connection such as a switch
*
* @param VoltageNode to break from this VoltageNode
*/
public void breakJoin(IopenVBBVoltage VoltageNode); /*** Registers this VoltageNode as being connected to a pullup resistor.
*
<p>* This models a VoltageNode that has no registered VoltageSource as being assigned a weak default pullup
* voltage source of value VDD
*
* @param ohms the ohms rating of the pullup resister to model
*/
public void RegisterAsPullup(double ohms); /*** Unregisters this VoltageNode as being connected to a pullup resistor.
*/
public void UnRegisterAsPullup(); /*** Registers this VoltageNode as being connected to a pulldown resistor.
*
<p>* This models a VoltageNode that has no registered VoltageSource as being assigned a weak default pulldown
* voltage source of value VSS
*
* @param ohms the ohms rating of the pulldown resister to model
*/
public void RegisterAsPullDown(double ohms); /*** Unregisters this VoltageNode as being connected to a pulldown resistor.
*/
public void UnRegisterAsPullDown();